indicator · own pane · open source
ATR Volatility Ratio indicator
ATR Volatility Ratio is a free open-source indicator. ATR Volatility Ratio — short ATR divided by long ATR. Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What ATR Volatility Ratio does
ATR Volatility Ratio — short ATR divided by long ATR. Above 1 = volatility expanding; below 1 = volatility contracting. Crosses of 1 mark regime shifts in the noise.
- Below 0.7 for many bars = coiled spring; size up on the breakout.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("ATR Volatility Ratio", overlay=false)
shortLen = input.int(5, "Short ATR length", minval=2, maxval=50)
longLen = input.int(50, "Long ATR length", minval=10, maxval=200)
colorMid = input.color("color.orange", "Color Mid")
colorNeutral = input.color("color.gray", "Color Neutral")
ratio = ta.atr(shortLen) / math.max(ta.atr(longLen), 0.0001)
hline(1, "Neutral", color=colorNeutral)
p_Vol_Ratio = plot(ratio, "Vol Ratio", color=colorMid, linewidth=2)
alertcondition(ta.crossover(ratio, 1), "Vol expanding", "ATR ratio above 1 — volatility expanding")
alertcondition(ta.crossunder(ratio, 1), "Vol contracting", "ATR ratio below 1 — volatility contracting")
No comments yet.
Sign in to comment.