VolatilityRatio
How wide the last few bars ranged against a longer baseline: above 1 means volatility is rising.
VolatilityRatio divides a short-window average true range (ATR) by a long-window one. Each ATR measures how wide the bars are, counting gaps from the previous close. It starts from a plain average, then Wilder-smooths each new bar in. At defaults it compares the last 5 one-minute bars with the last 20, so it measures range expansion and contraction, not direction.
How to read it
- The line sits in its own pane below the price, centred near 1.
- Above 1.45, the top 5% of readings in a one-month SPY sample at defaults, the last bars are far wider than the baseline.
- Below 0.53, the bottom 5% of readings, the last bars are tighter than usual.
- Read the turn: a fall from above 1.45 back toward 1 means the burst of range is fading, not that price is reversing.
What it outputs
- Volatility ratio
- Short-window ATR divided by long-window ATR. Above 1 means the recent bars range wider than the baseline; below 1 means they are tighter.
Settings
- short_window
- Bars in the fast range average. Lower reacts to the last few bars, so the line jumps on single wide bars. Higher smooths it, so the line moves more slowly and reaches the extremes less often.
- long_window
- Bars in the baseline range average. Higher gives a slower norm, so a sustained expansion stays above 1 longer. Lower lets the baseline catch up, so the line settles nearer 1 sooner.
Pitfalls
- The line ignores direction. Its correlation with the close is effectively zero in the sample, so it says nothing about where price goes.
- Equal short and long windows pin the line at exactly 1. The first 19 bars at defaults are empty while the long average fills.
- One wide bar or gap lifts the fast average for several bars, so a single print can look like a regime shift. Wait for a second bar before reading an expansion.