TR
ATR +- 2*STDDEV
ATR +- 2*STDDEV
study(shorttitle="ATR STD", title="ATR STDDEV", overlay=false) length = input(20, minval=1) src = input(low, title="Source") src2 = input(high, title="Source2") mult = input(2.0, minval=0.001, maxval=50) basis0 = (high-low) basis = sma(basis0, length) basis2 = tr dev = mult * stdev(basis, length) upper = basis + dev lower = basis - dev plot(basis, color=green) plot(basis2,color=gray) p1 = plot(upper, color=red) p2 = plot(lower, color=blue)