Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnOrderUpdate

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

    OnOrderUpdate

    There is a critical note associated with OnOrderUpdata:

    Critical: If you want to drive your strategy logic based on order fills you must use OnExecutionUpdate() instead of OnOrderUpdate(). OnExecutionUpdate() is always triggered after OnOrderUpdate(). There is internal strategy logic that is triggered after OnOrderUpdate() is called but before OnExecutionUpdate() that can adversely affect your strategy if you are relying on tracking fills within OnOrderUpdate().

    What I understand is OnOrderUpdate is called before OnExecutionUpdate but can adversely affect your strategy this because of internal strategy logic.

    Can someone explain why such adverse condition?
    What are those internal strategy logic?

    The main differences that I notice belonging to OnExecutionUpdate are related to the execution itself.

    Is this meant that OrderState values cannot be trusted at the time that OnOrderUpdate is triggered?

    Thank you.

    Dan

    #2
    Hello Dan,

    The position may not be updated by the time OnOrderUpdate is triggered but it will be updated by the time OnExecution is triggered.

    Especially for the managed approach, the order handling rules need the position to be updated for the logic for order methods to operate correctly.

    The OrderState of the order should be correct in OnOrderUpdate.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    91 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    121 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    72 views
    0 likes
    Last Post PaulMohn  
    Working...
    X