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 kinfxhk, 07-14-2026, 09:39 AM
    0 responses
    125 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    105 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    85 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    105 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    85 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X