Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

Breakout Follow-Through Statistics: Real Break or Fakeout After a New N-Bar High or Low? - indicator for MetaTrader 5

Views:
41
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

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.

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).

Pullback Depth Statistics: How Deep Do Pullbacks Go Before the Trend Resumes? Pullback Depth Statistics: How Deep Do Pullbacks Go Before the Trend Resumes?

Builds a real depth distribution for this symbol's pullbacks — how far price typically retraces before the trend resumes, and how often it doesn't resume at all.

Squeeze Duration Statistics: How Long a Low-Volatility Squeeze Lasts and How Far the Range Expands After It Squeeze Duration Statistics: How Long a Low-Volatility Squeeze Lasts and How Far the Range Expands After It

Measures low-volatility squeezes on your own symbol and timeframe. A squeeze is a run of bars in which the range of the last bars is small compared with the ATR. The indicator draws the length of every squeeze, marks the bar that ended it, and a panel shows how long squeezes last, how far the range expanded in the bars after the release, how that compares with any other bar, and which side of the squeeze box the first close went to. It is a statistics tool and gives no trade signals.

PropFirm Consistency and Drawdown Monitor PropFirm Consistency and Drawdown Monitor

Read-only PropFirm daily drawdown, trailing total drawdown, and single-day consistency cap HUD monitor with four closed-bar iCustom buffers.

MACD Signals MACD Signals

Indicator edition for new platform.