Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnExecutionUpdate not triggering

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

    OnExecutionUpdate not triggering

    I have a complex strategy and need to use the "OnExecutionUpdate".

    I use the standard "enterLong", "exitLong" etc...

    Even though I get orders, the "OnExecutionUpdate" is NOT being triggered.

    To test further, I added the following to the sampleMA to check the "OnExecutionUpdate" calls and do not get anything although I do have orders:

    protected override void OnExecutionUpdate(Execution execution, string executionId, double price, int quantity, MarketPosition marketPosition, string orderId, DateTime time)
    {
    Print("execution.Order.name " + execution.Order.Name + Time[0].ToString());
    }


    What setting needs to be added to get this to trigger??

    Note: This is running against data down-loaded from IB and is also running on an IB paper account...

    Thanks!​
    Last edited by waltFX; 02-17-2023, 02:09 PM.

    #2
    Hello, thanks for writing in. There is no setting for the OnExecutionUpdate event. It will be called if you override in in your script properly. There is an example linked here that you should test first and see if you are able to run this on your installation:

    https://ninjatrader.com/support/help...onorderupdate_ and_onexec.htm

    If you are able to run this script with no issue, look at the source code for the proper implementation of this event from within the Strategy class.

    OnExecutionUpdate would also not be called for orders placed from outside of the strategy (manually placed orders, orders placed by other strategies). To get updates on the account you would need to set up an Account object as shown here:


    Kind regards,
    -ChrisL

    Comment


      #3
      Thanks for the info..

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      89 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 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
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X