Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

unable to match order state to execution

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

    unable to match order state to execution

    Hi NT experts,

    I got multiple messages "unable to match order state to execution" when an order is executed by 3 partill filles. When i have an order completely filled by one execution, i did not get such message.

    The codes involing checking order state and execution are pasted below. Can anyone she some light on which ones are likely produce such message with partial fills?

    if (entryOrder != null && entryOrder.Token == execution.Order.Token)

    if (execution.Order.OrderState == OrderState.Filled || execution.Order.OrderState == OrderState.PartFilled || (execution.Order.OrderState == OrderState.Cancelled && execution.Order.Filled > 0))

    #2
    binwang2,

    Due to race conditions it is possible for the underlying IOrder object to be further ahead than the execution event. You could be processing the first partial fill execution and when you check the IOrder it will be in a filled state. Instead, work off of the execution directly. You know what quantity you submitted at, you know the execution.Quantity. You can calculate out the rest.
    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
    673 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    379 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    111 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    578 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    582 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X