Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=3
- study(title='MARKET', overlay=true)
- src = close
- sma9 = sma(src, input(9, title='9 SMA'))
- sma20 = sma(src, input(20, title='20 SMA'))
- sma30 = sma(src, input(30, title='30 SMA'))
- sma50 = sma(src, input(50, title='50 SMA'))
- buy920 = close > sma9 and close > sma20? lime : na
- bgcolor(buy920, transp=85, show_last=10, title='BUY /9 /20')
- sell920 = close < sma9 and close < sma20? red : na
- bgcolor(sell920, transp=80, show_last=10, title='SELL \9 \20')
- long3050 = crossover(sma30, sma50)
- plotshape(series=long3050, title='LONG 30X50', style=shape.triangleup, location=location.belowbar, color=lime, text='LONG 30X50', transp=0, size=size.small)
- short3050 = crossunder(sma30, sma50)
- plotshape(series=short3050, title='SHORT 30X50', style=shape.triangledown, location=location.abovebar, color=red, text='SHORT 30X50', transp=0, size=size.small)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement