One two three breakout event
A close above the 100-bar high after a low-touch setup; with these inputs it never draws a marker.
One-two-three breakout is meant to flag a bottom setup followed by a close above the recent high. The setup comes from the 100-bar channel: touch the low, rally, return to the low. In this code the rally step always passes, so the setup flips on every third bar while price stays near the low. The breakout then needs a close above the channel high, but that high already includes the same bar, so the test cannot pass.
How to read it
- Markers would sit on a candle that closes above the 100-bar high, one bar after the setup arms near the low.
- With default inputs no markers appear on SPY one-minute bars, so an empty chart is the expected result here.
- The presets widen the setup, but the markers still stay empty; the cause is the breakout test (see pitfalls).
What it outputs
- Breakout
- Marks a bar that closes above the 100-bar high, one bar after the bottom setup arms. On SPY one-minute bars with defaults it never marks a bar.
When it fires
Would fire on a bar that closes above the 100-bar high, one bar after the setup armed: a fresh high right after a touch of the low. The high includes the same bar, so with default inputs it never fires.
Settings
- eps
- Tolerance for a touch of the 100-bar low, as a fraction: 0.003 means 0.3%. Raising it arms the setup on more bars; lowering it arms fewer. On default inputs no value draws a marker, so the chart looks the same.
- pullback
- No effect on this output. The rally check in the setup lacks brackets, so this value never decides anything (see pitfalls). Changing it leaves the chart unchanged.
- confirm_days
- Number of bars in a row the breakout must hold before a marker draws; raising it demands more consecutive bars. On default inputs the breakout never holds for even one bar, so no value draws a marker.
Pitfalls
- Empty at defaults: zero events in the one-month SPY sample of 20,160 bars. With the default inputs, no setting of eps, pullback or confirm_days makes it fire, because the breakout test cannot pass.
- The setup's rally check lacks brackets, so the | binds before >=. The check always passes once warm, and pullback does nothing.
- The breakdown twin compares close with a low that also includes the same bar, so it never fires either.