The error message "OCO order overfill detected on strategy" occurs under a very specific scenario.
1) Place an Order for quantity of 2
2) Partial fill of profit target of quantity 1
3) Stop Loss of quantity 1
My strategy looks something like this:
SetProfitTarget (OrderName,CalculationMode.Ticks,profitTarget);
SetStopLoss(OrderName,CalculationMode.Ticks,stopLo ss,false);
EntryOrders = EnterLongLimit(0,true,PositionSize,LimitPrice, OrderName)
I don't send a CancelOrder () command, the error occurs as soon as the stop loss is reached.I would greatly appreciate any suggestions that would prevent the strategy from creating this error. Thanks.
Note: I am doing my tests with market replay.
Comment