Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

cancel orders

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

    cancel orders

    Hi NT experts,

    Is it possible when evaluating a logic block, an order can be in pending cancel at the begining of the evaluation and then in cancelled staus when evaluating rest of the logic.

    Suppose under OnBarUpdate
    if (order1 !=null && order1.Filled ==0)
    {
    CancelOrder(order1);
    }

    Under OnOrderUpdate, order1 is set to null if cancelled.

    Is it possible that when evaluating order1!= null the order staus is pendingcancel, while when evaluating order1.Filled ==0 it is cancelled?

    #2
    Not sure what you mean. If the order state changes you will receive the event in OnOrderUpdate(). If you have not received this event, your code will not switch anything for the order state.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    594 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    343 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    556 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    554 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X