If not at the end of the same candle, what about at the beginning of the next candle?
What if we define for exiting long (or short) position conditions: (for backtesting purposes)
close>= opening price
close<opening price
(any condition to be acomplished, to ensure every position opened at the beginning of the candle will be closed at the beginning of the next candle)
I’ve tried to do like this, but it seems not to work I don’t know why (it seems to work just for the first candle an order is opened,… but probacktest don’t open any order more later than this first time the first order is opened and closed) Thank you.