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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    157 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    91 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    143 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    131 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    107 views
    0 likes
    Last Post CarlTrading  
    Working...
    X