Market regime
Calm (0), high volatility (1) or extreme (2): flags ATR and volume spikes that come with a trend, and reads 0 almost always.
Each bar, it compares the current ATR and volume with their averages over the last vol_window bars, and that average includes the current bar. It reads 2 when ATR is over 2 times its average, volume is over 2.5 times its average and ADX is over 25. It reads 1 when ATR is over 1.4 times, volume over 1.5 times and ADX over 18. Otherwise it reads 0. The value has no price direction, so a sharp rally on heavy volume scores the same as a sharp drop, though the source calls level 1 a crash.
How to read it
- The line sits in its own pane below the price and takes whole values only: 0 calm, 1 high volatility, 2 extreme.
- On SPY one-minute bars for September 2026 it read 0 on at least 95% of bars and its highest reading was 2, so a flat line at 0 is the normal picture.
- A 1 or 2 marks a bar where ATR and volume jumped together with a trend present. It shows that a spike happened, not which way price moved.
What it outputs
- Regime
- Whole-number volatility regime: 0 calm, 1 high volatility, 2 extreme. Blank during warm-up while the averages fill.
Settings
- vol_window
- Bars in the ATR and volume averages. A ratio cannot exceed this number, so at 1 the line never leaves 0 and level 2 needs at least 3. Longer windows let spikes read higher against the average, so more bars reach 1 or 2, but a spike stays in the average longer.
Pitfalls
- It is nearly silent at defaults. On SPY one-minute bars for September 2026 its correlation with close was 0.01, so it does not track price.
- The close input only checks for missing data during warm-up and never changes the value. Pair it with a price or direction tool, since the reading has no sign.
- The try presets follow from the formula, not from measured counts. They were not run on SPY, so check how often 1 and 2 appear before relying on them.