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 argusthome, Yesterday, 10:06 AM
    0 responses
    14 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    11 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    9 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    4 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    31 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X