I have simple strategy testing. In shift 4,3,2,1 candles if
4+3 are red and 2+1 are green buy
4+3 are green and 2+1 are red sell
Filtering is made for each candle by open price - close price . If open price < close price = green candle, if open price > close price = red candle.
I run backtesting and I see it opens trades when candles have other colors. Can you tell me how to fix this bug?
This