Loading…

Pattern Base Rate Labels

Every candlestick pattern indicator will tell you a bar is a "bullish engulfing." Almost none will tell you how often that specific pattern, on that specific symbol and timeframe, actually worked. This one does: it keeps a running tally of every engulfing pattern it has ever detected in the chart's history, checks InpLookAheadBars bars later whether price moved at least InpSuccessThresholdPips in the expected direction, and labels every NEW pattern with the hit rate built from that tally so far. The tally is kept honest with a pending-outcome queue rather than a simple counter. When a pattern is detected, it is added to the queue with its own countdown; nothing about it is counted as a hit or a miss until that countdown reaches zero. A newly detected pattern's own label is built only from patterns whose outcome window had ALREADY closed before this bar - a pattern's own eventual result is never folded into its own label, and a still-pending pattern never influences anyone else's percentage until it resolves. Early in a chart's history, before enough patterns have resolved, the label reads "no data yet" rather than showing a misleadingly confident number from a tiny sample. Bullish and bearish engulfing are tracked as separate populations with their own hit rates, since there is no reason to assume they behave the same way on a given instrument. Notes and limitations - The percentage shown is a plain hit rate against one fixed threshold and lookahead window, not a statistically tested edge - it says nothing about position sizing, risk, or whether the sample is large enough to trust. - Sample size (n) is shown alongside every percentage precisely because a rate built from a handful of occurrences is not meaningful. Treat anything under a few dozen occurrences with real scepticism. - The tally only ever grows forward from whatever history is loaded on the chart; loading more history before attaching the indicator gives it a longer track record to draw the base rate from. - Engulfing is a two-bar pattern with no trend, volume, or location filter attached - the base rate reflects the pattern in isolation, not the pattern used with any particular strategy around it.

Indicator · MT5 · v1.0 · Free

About Pattern Base Rate Labels

Pattern Base Rate Labels is an indicator for MetaTrader 5. It draws buy and sell arrows on the chart, can alert you with a pop-up, sound, email or push message and marks candlestick patterns. It has 4 settings, such as Look ahead bars, Success threshold pips and Show labels. MQL source code included.

Files in the download: PatternBaseRateLabels.ex5, PatternBaseRateLabels.mq5, PatternBaseRateLabels.txt.

Settings

SettingDefaultWhat it does
Look ahead bars10Bars ahead checked to decide whether a pattern "worked"
Success threshold pips20Pips of favourable close move required to count as a hit
Show labelstrueDraw the base-rate percentage text under/over each pattern
AlertstrueAlert once per closed bar on a new pattern

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Candlestick Patterns · Buy/Sell Arrows · Alerts · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria