IamTheDudeMan

5 Day Average Daily Range

1027 2 90
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
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