I get a problem when I backtest my strategy. At some point, I go short and it places automatically by stop_loss and take_profit orders. The problem happens a few candles later when the candle is so big that both orders are triggered at the same time. I thought it wasn't possible since I handle order cancellation. Here is the log :
And here is my part of the code that handles order cancellation and places stop_loss/take_profit orders (inside notify_order) :
Should I manage cancellation with OCO property instead of using broker.cancel(...)?