I am trying to code a strategy with multiple conditions fulfill in different candles. But what I get is multiple conditions fulfill in 1 candle. The idea of the strategy:- After cond1 return "true", the program will continue to search for cond2 until cond2 return "true". It could be many candles away from cond1. And after cond2 return "true", the program will continue to search for cond3 until cond3 return "true".
cond1 = ta.crossover(fastMA, slowMA))
cond2 = ta.crossunder(close, medMA)
cond3 = ta.crossover(close, fastMA))
enterLong = cond1 and cond2 and cond3
Hope someone can help me on this. Many thanks.