Breakout confirmation
Fires once price has closed above a level for N bars in a row, on the bar the run reaches N.
It counts how many bars in a row price has been above the level and fires on the bar that count reaches bars. It fires once per run: later bars of the same run stay empty, and a bar at or below the level starts the count again. The level input has no default; on this chart it reads the close, which is never above itself, so it never fires here.
How to read it
- Markers sit on the candles on the bar each run above the level reaches N bars.
- In a strategy, bind the level to a resistance line, such as a 20-bar high or a moving average.
What it outputs
- Confirmed breakout
- On only on the bar a run above the level reaches N bars.
When it fires
On the bar where price has been above the level for exactly bars bars in a row. On this chart the level is the close itself, so it never fires.
Settings
- bars
- How many bars in a row price must hold above the level. More bars wait longer and skip short pokes above it; 1 fires on the first bar above.
Pitfalls
- It fires once per run, so it marks the confirmation, not every bar price stays above.
- Confirmation costs bars: the entry comes N bars after price first got above the level.