90 1 13
Show Daily level SMAs on chart regardless of current interval.
Remove from Favorite Scripts Add to Favorite Scripts
study("DMAs", overlay=true)

// options
n1on = input(false, title="5 DMA")
n2on = input(false, title="10 DMA")
n3on = input(false, title="20 DMA")
n4on = input(true, title="50 DMA")
n5on = input(true, title="100 DMA")
n6on = input(false, title="150 DMA")
n7on = input(false, title="200 DMA")

plot((n1on)?security(tickerid, "D", sma(close, 5)):na, title="5 DMA", color=#970000, linewidth=1, style=line, transp=0)
plot((n2on)?security(tickerid, "D", sma(close, 10)):na, title="10 DMA", color=red, linewidth=1, style=line, transp=0)
plot((n3on)?security(tickerid, "D", sma(close, 20)):na, title="20 DMA", color=#FF9800, linewidth=1, style=line, transp=0)
plot((n4on)?security(tickerid, "D", sma(close, 50)):na, title="50 DMA", color=yellow, linewidth=1, style=line, transp=0)
plot((n5on)?security(tickerid, "D", sma(close, 100)):na, title="100 DMA", color=lime, linewidth=1, style=line, transp=0)
plot((n6on)?security(tickerid, "D", sma(close, 150)):na, title="150 DMA", color=#00FFFF, linewidth=1, style=line, transp=0)
plot((n7on)?security(tickerid, "D", sma(close, 200)):na, title="200 DMA", color=#4985E7, linewidth=1, style=line, transp=0)
Created as USOIL was coming into 100DMA
Ideas Scripts Chart
United States
United Kingdom
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 Account and Billing Sign Out