Volatility breakout detector
Scores 1 when price moves and ATR widen together, 0.5 when only price moves widen, 0 otherwise.
It compares the average relative size of the last three one-minute price moves with the earlier moves in the window. It also checks whether ATR, the average true range, has risen above its own recent average by the threshold. Both tests passing gives 1, the move test alone gives 0.5, and neither gives 0. Moves are measured as absolute changes, so the score does not show direction.
How to read it
- The line sits in its own pane below the price and is 0 on most bars.
- A 0.5 means the last three one-minute moves averaged more than 30% above the earlier moves in the window.
- A 1 also needs ATR above its recent average times the threshold, 1.5 by default.
- The line carries no direction, so check the candles to see which way the move went.
- Read a run of 0.5s or 1s as a widening-volatility stretch; a single bar is weak evidence.
What it outputs
- Breakout score
- 0 for no breakout, 0.5 when the last three one-minute moves beat the earlier moves by over 30%, and 1 when that also holds with ATR above threshold. Direction is not measured.
Settings
- window
- Bars of look-back for the ATR baseline and the move comparison; the first value waits until the window is full. Raising it smooths the signal and delays it; lowering it reacts faster and gets noisier.
- atr_expansion_threshold
- Multiple the current ATR must exceed its recent average before a full 1. Raising it leaves 1 for only the sharpest jumps. Lowering it toward 1 lets 1 fire on any ATR rise. Zero or below makes that test always pass.
Pitfalls
- Direction-blind: the price test uses absolute moves, so a sharp drop scores the same as a rally, despite the code comment calling it up.
- The bb_width input must be wired but does not change the value. Its expansion ratio is computed and never used, so the input only gates bars where it is missing.
- Windows of 4 or less break the comparison. At 4 there are no earlier moves to compare with, so almost any move scores at least 0.5; at 2 or 3 the value stays 0; at 1 it never outputs.