Volatility explosion
Marks the bar where volatility bursts out of a squeeze, with no view on direction.
It averages the true range (each bar's high-low range, widened to reach the previous close) over the last atr_window bars and compares that with the average over the last lookback bars. A squeeze is a bar where the recent average sits below 75% of that baseline; the squeeze count resets when the average rises above 110% of it, or after a marker fires. The marker lands on the first bar out of a squeeze where the recent average exceeds 1.4 times its lowest level during that squeeze, after at least three squeezed bars; those thresholds are fixed in the code, not parameters.
How to read it
- Each marker sits on one candle: the bar where a quiet stretch ended and ranges began widening.
- It reports that range expanded, not which way price moved; read candle direction and trend separately.
- A bigger value means a larger range jump after a longer quiet stretch.
- At defaults on SPY one-minute bars, expect about ten markers a day, on roughly 1% of bars.
What it outputs
- Volatility burst
- Marks the single bar where volatility bursts out of a squeeze. Only those bars carry a value, and a bigger value means a larger jump after a longer squeeze.
When it fires
On the first bar out of a squeeze where the recent average range is above 1.4 times its lowest level in that squeeze, after at least three squeezed bars. It means the quiet stretch has ended and candle ranges are widening; the bar's direction is not checked.
Settings
- atr_window
- Bars in the recent average range. Shorter reacts to every bar, so the squeeze and burst tests swing more. Longer averages damp single bars, so a burst has to persist before it lifts the average past the threshold. Keep it at or below lookback.
- lookback
- Bars of true range in the baseline that a squeeze is measured against. Longer compares the recent range with a slower, broader norm. Shorter makes the baseline track recent ranges closely. Must be at least atr_window.
Pitfalls
- Direction-blind: a burst down and a burst up mark the same bar. Pair it with a trend or direction filter.
- If atr_window is larger than lookback, the range history is cut short and the indicator never fires.
- The code also smooths an ATR into a value the signal never reads, so that smoothing has no effect on the markers.