Specification
Time frame - 30 minute.
some details and pine coding in screen shot, also result is shown over there.
if need any other details.
can contact me on pk0759@gmail.com or telegram - https://t.me/freestockmarketcoursecommunity
or whats app - +917574864489
strategy ("KDK'S MA Crossover Strategy V1", overlay = true)
start = timestamp (2008, 1,1,0,0)
end = timestamp (2022,9,1,0,0)
ema1 = ema(close, 2)
ema2 = ema(close, 5)
ema3 = ema(close, 11)
ema4 = ema(close, 7)
plot (ema1,title ="EMA5",color=color.green)
plot (ema2,title ="EMA9",color=color.black)
plot (ema3,title ="EMA14",color=color.blue)
plot (ema4,title ="EMA21",color=color.red)
//strategy
LongEntry = crossover (ema1,ema4)
LongExit = crossover (ema4, ema3)
ShortEntry = crossover (ema4, ema2)
ShortExit = crossover (ema2, ema1)
if time >= start and time < end
strategy.entry ("Long", strategy.long, 1, when = LongEntry)
strategy.close ("Long", when = LongExit)
strategy.entry ("Short", strategy.short, 1, when = ShortEntry)
strategy.close ("Short", when = ShortExit)