RicardoSantos

[RS]ADR channel V0

327 0 53
EXPERIMENTAL: needs validation if calculation is correct for the ADR             . granted it has more use with optional timeframe.
Remove from Favorite Scripts Add to Favorite Scripts
study("[RS]ADR channel V0", overlay=true)
tf = input(title='Timeframe:', type=string, defval='D')
window = input(title='Time Window:', type=integer, defval=30)
USE_AVGCENTER = input(title='Use Average Center or Open:', type=bool, defval=false)

adr = security(tickerid, tf, sma(tr, window))

middle = security(tickerid, tf, USE_AVGCENTER ? avg(high, low) : open)
upper = middle + adr
lower = middle - adr

plot(middle, title='middle line', color=change(middle)!=0?na:black, linewidth=1)
plot(upper, title='upper line', color=change(upper)!=0?na:black, linewidth=1)
plot(lower, title='lower line', color=change(lower)!=0?na:black, linewidth=1)
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
Việt Nam
日本
한국
简体
繁體
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 My Support Tickets Priority Support Contact Support Ideas Published Followers Following Private Messages Chat Sign Out