Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=3
- //@Author: Bitcoin_O_Plomo
- //This indicator was made to allow three moving averages to be displayed without needing to use up 3 charting indicators individually
- study(title="2-Year MA Multiplier", shorttitle="2Y-MA", overlay=true)
- // Checkbox's for the other 2 MA's
- a = input(true, title="Enable 2nd SMA")
- b = input(true, title="Enable 3rd SMA")
- len = input(730, minval=1, title="Length")
- len2 = input(730, minval=1, title="Length2")
- src = input(close, title="Source")
- src2 = input(close, title="Source2")
- out = sma(src, len)
- out2 = sma(src2 * 5 , len2)
- plot(out, title="SMA", color=red)
- plot(a and out2 ? out2: na, title="SMA2", color=green)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement