Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnExecutionUpdate with Playback

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

    OnExecutionUpdate with Playback

    I have written a strategy which overrides the OnExecutionUpdate method to add stops and targets. It works fine in Sim. But in Playback OnExecutionUpdate does not get called.. Can anyone advise what the problem might be? Thanks!

    #2
    Hello gbourque,

    We would need more specific details about what you created to be of assistance here. OnExecutionUpdate can be used with the playback connection, that override is called based on executions a strategy places. There is a sample in the following link that uses OnExecutionUpdate: https://ninjatrader.com/support/help...and_onexec.htm

    Comment


      #3
      I was using a global for my main order object and referencing that in OnExecutionUpdate instead of referencing the order object in the execution object parameter, as the example you pointed out shows. Apparently that was the problem. Thanks for your help!

      Comment


        #4
        print statements are sent by god, never forget that

        Comment


          #5
          They are indeed.

          Comment

          Latest Posts

          Collapse

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