IamTheDudeMan

5 Day Average Daily Range

818 2 70
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
Ideas Scripts Chart
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
日本
한국
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
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out