indicator · own pane · open source
Average True Range indicator
Average True Range is a free open-source indicator. ATR smooths the True Range over len bars — the canonical volatility number used for stops… Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Average True Range does
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
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Average True Range", overlay=false)
len = input.int(14, "ATR length", minval=1, maxval=200)
colorNeutral = input.color("color.gray", "Color Neutral")
colorDown = input.color("color.red", "Color Down")
ta.tr = ta.tr(true)
atr = ta.rma(ta.tr, len)
p_TR = plot(ta.tr, "TR", color=colorNeutral)
p_ATR = plot(atr, "ATR", color=colorDown, linewidth=2)
No comments yet.
Sign in to comment.