Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 rocketman7, Today, 02:12 AM
    5 responses
    23 views
    0 likes
    Last Post rocketman7  
    Started by trilliantrader, 04-18-2024, 08:16 AM
    7 responses
    28 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by samish18, 04-17-2024, 08:57 AM
    17 responses
    66 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by briansaul, Today, 05:31 AM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by PaulMohn, Today, 03:49 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X