Breakout patterns
Closes that break the last 100 bars' closing range, and the quick pullbacks that undo them.
Breakout patterns marks bars that close beyond the range of the last 100 closes. Breakout up fires on each bar whose close is above the highest close of the 100 bars before it, and breakout down fires below the lowest. A failed breakout fires once when price gives back 0.2% of the broken level within reversal_window bars (15 by default), and the mirror case marks a breakdown that bounces back above the broken low.
How to read it
- Markers sit on the candles; nothing is drawn in a pane. Up markers are new 100-bar closing highs, down markers new 100-bar closing lows.
- A run of consecutive markers is one breakout. On SPY at defaults runs average under two bars, and each direction fired about 22 to 23 times a day.
- Failed markers sit on the bar where price falls back through the level it broke, or bounces back above a broken low. They are rare at defaults, so each one stands out.
- A failed marker says the break did not hold; it does not predict the next move.
What it outputs
- Breakout up
- Marks each bar that closes above the highest close of the 100 bars before it. A run of marks is one breakout.
- Breakout down
- Marks each bar that closes below the lowest close of the 100 bars before it. A run of marks is one breakdown.
- Failed up
- Marks where, within reversal_window bars after the last bar of an up breakout, a close falls more than 0.2% below the level that breakout set.
- Failed down
- Marks where, within reversal_window bars after the last bar of a down breakout, a close rises more than 0.2% above the level that breakdown set.
When it fires
Breakout markers fire on every bar past the prior 100-bar closing high or low, so one breakout shows as a run. Failed markers fire once per stretch, when price gives back the break within reversal_window bars: the move did not hold.
Settings
- reversal_window
- How many bars after the last breakout bar a pullback can still mark a failure. Raising it (60) lets later pullbacks count, giving more failed markers; lowering it (5) limits failures to right after the break. Breakout markers do not change.
- up_tolerance
- Sets the failed-up level as a share of the broken high; at 0.998 it is 0.2% below. Closer to 1 (0.9995) catches smaller pullbacks and gives more failed-up markers; lower (0.99) needs a deeper drop and gives fewer.
- down_tolerance
- Sets the failed-down level as a share of the broken low; at 1.002 it is 0.2% above. Closer to 1 (1.0005) catches smaller bounces and gives more failed-down markers; higher (1.01) needs a bigger bounce and gives fewer.
Pitfalls
- This chart feeds the uptrend, downtrend and unknown inputs the close price, which counts as on, so no trend filter applies and breakouts mark in every trend. Wire them to trend states to apply it.
- The channel is the highest and lowest close of 100 bars, not bar highs and lows. Its length comes from the donchian_trends input, not from this indicator's parameters.
- Failed markers are rare at defaults: 9 failed up and 24 failed down in a month of SPY bars. They only check the bars right after a breakout, so a later pullback in a trend is never marked.