vitvlkv

Average True Range (Custom)

360 1 29
Simple ATR indicator with the input that allows user to select the smoothing algorithm. Classical ATR uses rma smoothing.
Remove from Favorite Scripts Add to Favorite Scripts
study(title="Average True Range (Custom)", shorttitle="ATR_C", overlay=false)
smooth = input(1, minval=1, maxval=3, title='Smoothing: 1-rma, 2-sma, 3-ema')
length = input(14, minval=1)
atr = smooth == 1 ? rma(tr, length) :
    smooth == 2 ? sma(tr, length) :
    smooth == 3 ? ema(tr, length) :
    na
plot(atr, color=red)
Hi Vitvlkv
Would you mind adding another drop down box that enables two ATR lines to be drawn on the same graph?
Thanks in advance
BB3
Reply
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing Priority Support Ideas Published Followers Following Private Messages Chat Sign Out