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 NullPointStrategies, Today, 05:17 AM
      0 responses
      39 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X