Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

More complicated syntax

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

    More complicated syntax

    When developing a strategy with a purpose of entering and exiting trades and <EnterLong()>(as an example) and SetProfitTarget() are applicable, why would you find it necessary to involve <OnOrderUpdate> and/or <OnExecutionUpdate()>?

    #2
    Hello galsermil,

    That really depends on what your goals are for your strategy. OnOrderUpdate observes updates of order statuses and OnExcutionUpdate is called for executions. If your strategy needed to know when an order filled to do something you would use OnExecutionUpdate. If you needed to work with order objects you can use either OnOrderUpdate or OnExecutionUpdate to collect orders.

    You can see an example of using those overrides here: https://ninjatrader.com/support/help...and_onexec.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    41 views
    0 likes
    Last Post CarlTrading  
    Working...
    X