Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ChangeOrder Limit on OCO

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ChangeOrder Limit on OCO

    Hi,

    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:
    Code:
    Print(Time[0] + " " + inst.TargetOrder);
    ChangeOrder(inst.TargetOrder, 0, inst.TargetPrice, 0);
    Print(Time[0] + " " + inst.TargetOrder);
    As a workaround, I cancel the order and resubmit it which seems to work:
    Code:
    							
    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");
    Any ideas?

    Thanks

    #2
    Hi ryker, could you please contact me directly via Help > Mail to Support and if possible attach your test strategy used where the issue came up?

    Thanks much,

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    68 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    37 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    62 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X