Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=3
- strategy(title="EMACross NOSHORT", shorttitle="ECNS", overlay=true)
- es=input(7, "es")
- em=input(30, "em")
- EMASmall = ema(close, es)
- EMALarge = ema(close, em)
- plot(EMASmall, color=green)
- plot(EMALarge, color=purple)
- long=(EMASmall > EMALarge)
- stop=(EMALarge > EMASmall)
- strategy.entry(id = "Long", long = true, when = long)
- strategy.close(id = "Long", when = stop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement