Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. //@version=3
  2. study(title='MARKET', overlay=true)
  3.  
  4. src = close
  5.  
  6. sma9 = sma(src, input(9, title='9 SMA'))
  7. sma20 = sma(src, input(20, title='20 SMA'))
  8. sma30 = sma(src, input(30, title='30 SMA'))
  9. sma50 = sma(src, input(50, title='50 SMA'))
  10.  
  11. buy920 = close > sma9 and close > sma20? lime : na
  12. bgcolor(buy920, transp=85, show_last=10, title='BUY /9 /20')
  13.  
  14. sell920 = close < sma9 and close < sma20? red : na
  15. bgcolor(sell920, transp=80, show_last=10, title='SELL \9 \20')
  16.  
  17. long3050 = crossover(sma30, sma50)
  18. plotshape(series=long3050, title='LONG 30X50', style=shape.triangleup, location=location.belowbar, color=lime, text='LONG 30X50', transp=0, size=size.small)
  19.  
  20. short3050 = crossunder(sma30, sma50)
  21. 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