Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. //@version=3
  2. strategy(title="EMACross NOSHORT", shorttitle="ECNS", overlay=true)
  3. es=input(7, "es")
  4. em=input(30, "em")
  5. EMASmall = ema(close, es)
  6. EMALarge = ema(close, em)
  7. plot(EMASmall, color=green)
  8. plot(EMALarge, color=purple)
  9.  
  10. long=(EMASmall > EMALarge)
  11. stop=(EMALarge > EMASmall)
  12.  
  13. strategy.entry(id = "Long", long = true, when = long)
  14. strategy.close(id = "Long", when = stop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement