IamTheDudeMan

5 Day Average Daily Range

625 2 53
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)
r0hand PRO
2 years ago
ok, how to add this to my chart ?
Reply
IamTheDudeMan r0hand
2 years ago
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
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener 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 Billing Sign Out