Volatility spike detector
Scores 0 to 5 for one-minute volatility bursts; it stayed at 0 on every SPY bar in the sample.
The indicator divides the current ATR by an ATR average input and measures how far the ATR rose over the last two bars. It compares the bar's volume with the last ten bars and takes the bar's high-low range as a share of price, plus a short rate of change. It returns 0 unless every test for a level passes, then 1 to 5 for stronger bursts; the rate of change counts as an absolute value, so up and down moves score alike.
How to read it
- The line sits in its own pane below the price and only takes whole values from 0 to 5.
- 0 means no burst. Level 1 needs the ATR above 1.5 times its average, a bar range above 2.5 percent of price, and volume above 1.3 times its recent average. Higher levels need stronger readings on every test.
- On the September 2026 SPY sample the line was 0 on every bar, so a flat line on SPY one-minute charts is the expected result.
What it outputs
- Spike level
- Whole number from 0 (no spike) to 5 (extreme volatility burst), one value per bar.
Pitfalls
- It never fired on the sample and has no settings to loosen. The 2.5 percent bar-range gate is far above typical one-minute SPY ranges, so the line stays flat.
- The docstring says it flags moves that often precede mean reversion, but the code only measures volatility bursts and ignores direction. Nothing in it confirms a reversal.
- The ATR average and short rate-of-change inputs have no default, so the output depends on how they are wired to the chart.