indicator · own pane · open source
Average True Range
Running…
Loading chart…
About
ATR smooths the True Range over len bars — the canonical volatility number used for stops, position sizing and ride-regime filters.
- Rising ATR = expanding volatility (trend / news regime).
- Falling ATR = contracting volatility (compression / chop).
Source code
//@version=5
indicator("Average True Range", overlay=false)
len = input.int(14, "ATR length", minval=1, maxval=200)
tr = ta.tr(true)
atr = ta.rma(tr, len)
p_TR = plot(tr, "TR", color=color.gray)
p_ATR = plot(atr, "ATR", color=color.red, linewidth=2)
No comments yet.
Sign in to comment.