Fresh MQL5 code release – perfect for enhancing your MT4/MT5 strategies.
Breakout Follow-Through Stats
Category: Indicators.
The idea behind it
"Don't trade breakouts, they're all fakeouts" and "breakouts work, you just need patience" are both things traders say with total confidence about the same chart. This indicator settles the argument for whatever symbol and timeframe you're actually looking at. Every time price closes beyond the high or low of the prior N bars, that's flagged as a breakout attempt, marked on the chart, and placed into a short evaluation window. If price closes convincingly beyond the broken level within that window, it's scored a follow-through. If it snaps back across the level instead, it's a fakeout. Running out of room without a clean confirmation either way defaults to a fakeout, since an indecisive breakout isn't one you'd have stayed in anyway.
Watch in-depth trading tutorials and EA reviews on the RobotFX YouTube channel. Subscribe for free tips.
New-high breaks and new-low breaks are scored separately, because plenty of instruments have a directional bias in how their extremes behave — this won't assume symmetry, it measures each side on its own.
How to interpret it
- Each breakout gets a small arrow at the bar it happened on: gray while still being evaluated, bright white once confirmed as a real follow-through, dim once scored a fakeout.
- The summary panel shows the follow-through and fakeout percentage for new highs and for new lows separately, with a sample size (n) attached.
- Below a minimum sample, the panel shows "n/a" instead of a misleadingly precise percentage.
- "Pending" is how many breakouts are currently inside their evaluation window with no verdict yet.
- A one-time backfill on attach means the scorecard is populated from real history immediately, not built from scratch going forward.
External variables (inputs)
| Input | Default | Purpose |
|---|---|---|
| InpWorkTimeframe | PERIOD_H1 | Timeframe the N-bar extremes and breakout logic run on. |
| InpRangeBars | 20 | The "N" in N-bar high/low — how many prior bars define the range being broken. |
| InpEvalBars | 5 | Bars allowed for a breakout to resolve into follow-through or fakeout. |
| InpFollowThroughBufferFrac | 0.25 | Fraction of the N-bar range used as the confirmation buffer beyond the broken level. |
| InpLookbackBars | 3000 | Bars walked once on attach to seed the statistics. |
| InpMaxMarkers | 40 | Cap on how many breakout arrows stay drawn on the chart at once (oldest are removed first). |
| InpCorner | CORNER_LEFT_UPPER | Chart corner the summary panel is anchored to. |
| InpCornerX | 20 | Panel X offset in pixels. |
| InpCornerY | 20 | Panel Y offset in pixels. |
Recommended use
- Attach per symbol and per timeframe you actually trade — breakout behavior is specific to both, and the stats won't transfer across instruments or timeframes.
- Try a few different InpRangeBars values; a 10-bar range and a 50-bar range on the same symbol can have noticeably different follow-through rates.
- Treat the percentages as a base rate to weigh against your own entry criteria, not as a standalone signal to trade off.
- Works well alongside the Round Number Reaction Map from the same shelf when a breakout level also happens to sit near a round number.
- Pure visualization — it places no orders and holds no position.

Fig. 1. Breakout Follow-Through Stats — breakout arrows at N-bar extremes, colored by outcome, with the follow-through/fakeout scorecard (shown in black & white per Code Base image guidelines).
Complement community code with advanced automation from RobotFX.
80204