vitvlkv

Average True Range (Custom)

418 1 31
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
Deutschland
España
France
Việt Nam
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing Support Priority Support Report Issue Ideas Published Followers Following Private Messages Chat Sign Out