I've got a problem when changing the limit price for a target order, it seems that after the change the order goes in a pending change but is never acknowledged and then ignored by the strategy (in a backtest), below are the logs for the change:
23/11/2011 22:00:00 Order='NT-00002/Sim101' Name='MP-101-T' State=Working Instrument='ES 12-11' Action=Sell Limit price=1199 Stop price=0 Quantity=1 Strategy='RS_MonoLive' Type=Limit Tif=Gtc Oco='MP-101' Filled=0 Fill price=0 Token='5a423410673a4915ac176cae582f1f09' Gtd='01/12/2099 00:00:00'
23/11/2011 22:00:00 Order='NT-00002/Sim101' Name='MP-101-T' State=PendingChange Instrument='ES 12-11' Action=Sell Limit price=1185 Stop price=0 Quantity=0 Strategy='RS_MonoLive' Type=Limit Tif=Gtc Oco='MP-101' Filled=0 Fill price=0 Token='5a423410673a4915ac176cae582f1f09' Gtd='01/12/2099 00:00:00'
and the code used:
Print(Time[0] + " " + inst.TargetOrder); ChangeOrder(inst.TargetOrder, 0, inst.TargetPrice, 0); Print(Time[0] + " " + inst.TargetOrder);
string oco = inst.TargetOrder.Oco; int q = inst.TargetOrder.Quantity; OrderAction oa = inst.TargetOrder.OrderAction; CancelOrder(inst.TargetOrder); inst.TargetOrder = SubmitOrder(BarsInProgress, oa, OrderType.Limit, q, inst.TargetPrice, 0, oco, oco + "-T");
Thanks

Comment