I'm trying to set up some stop loss and take profit orders after I enter a buy or sell trade. For some reason, these stop loss and take profit orders are getting cancelled immediately after they've been placed. What am I doing wrong here? Attached backtest for reference.

197061_1668089264.jpg

Secondly, why is it entering these stop loss and take profit orders the day after I enter my buy or sell positions? Shouldn't this trigger as soon as it's detected OnOrderEvent?

197061_1668089268.jpg

Author