IamTheDudeMan

5 Day Average Daily Range

1252 2 104
Simple 5 day average range, adjust to true price movement rather than fixed levels.

-Enjoy
Remove from Favorite Scripts Add to Favorite Scripts
//Created by Rob Olson 7.14.2014
//Average Daily Range Levels - 5 day

study(title="F0_ADR5", shorttitle="F0_ADR5", overlay=true) 

tsp=input(95,title="ADR Fill Transparency Level",type=integer)


dayHigh=security(tickerid, 'D', high[0]) 
dayLow=security(tickerid, 'D', low[0]) 

//ADR Levels
dayrange=(high - low)

r1 = security(tickerid, 'D', dayrange[1]) 
r2 = security(tickerid, 'D', dayrange[2]) 
r3 = security(tickerid, 'D', dayrange[3]) 
r4= security(tickerid, 'D', dayrange[4])
r5= security(tickerid, 'D', dayrange[5])

//get average daily range of prior 5 days
adr_5 = (r1+r2+r3+r4+r5) /5


//plot the adr levels
adrhigh=plot((dayLow+adr_5) , title="ADR High",style=line,color=navy,linewidth=2) 
adrlow=plot((dayHigh-adr_5), title="ADR LOW",style=line, color=aqua,linewidth=2)

fill(adrlow,adrhigh,color=aqua,transp=tsp)
ok, how to add this to my chart ?
Reply
Add the script as a "favorite" > right click your chart > select from menu "insert Indicator" > then "favorites"
You will see your list of favorite scripts you've selected from others.
Reply
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
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 Contact Support Ideas Published Followers Following Private Messages Chat Sign Out