hi i was trying to test if stochastic crosses over 80, buy if stochastic crosses under 20 sell
for some reason, the order doesn't get executed properly(i mean it doens't get executed at all) any thoughts on why this is happening?
//@version = 2
strategy("buy signal entry")
signal = stoch(close,high,low,14)
//plot stochastics
plot(signal,color = white)
//buy when signal crossover 80 and sell when it crossunder 20
buysignal = crossover(signal,80)
sellsignal = crossunder(signal,20)
if(buysignal)
strategy.entry("buy", strategy.long)
if(sellsignal)
strategy.exit("exit", "buy")