Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

'OnOrderUpdate' method error - more than 100 subsequent user events

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

    'OnOrderUpdate' method error - more than 100 subsequent user events

    I have never seen this error message before:
    **NT** Error on calling 'OnOrderUpdate' method for strategy 'ChaosHunterStrategy/566ac974c5b34e7fb8490d498a5c85e6': More than 100 subsequent user events

    Any ideas as to what I should be looking for.

    Thanks,

    John

    #2
    Hello scjohn,

    This message typically is given when a repeated number of methods/functions are called in succession and stack up before NinjaTrader can process them all.

    Are you using any Custom Events or external methods?

    JCNinjaTrader Customer Service

    Comment


      #3
      My bad. I caused an endless loop OnOrderUpdate method.

      Comment


        #4
        Hello John,

        Thank you for your update.

        I am glad you were able to resolve this matter.

        Please let us know if we may be of further assistance.

        Comment


          #5
          Hi There,

          I just ran into this as well. A simple way to re-create this scenario is to put a SetStoploss() into the OnOrderUpdate method, where the Order update sets a new stop loss and SetStopLoss triggers another OnOrderUpdate which triggers another SetStopLoss and so the loop continues...

          Way around this - set a price variable in the OnOrderUpdate Method based on order.stopprice or order.limitprice and pick that variable up in the OnBarUpdate Method where you can then call SetStopLoss() to actually change the stop/target.

          Kind Regards
          Frank

          Comment


            #6
            Hello Frank,

            A stop loss is an order and modifying it will cause OrderUpdates to occur. There wouldn't be anything stopping you from updating an active stop loss from OnOrderUpdate, you would just have to be sure that your OnOrderUpdate logic is restrictive enough to only update the stop loss on say: OrderUpdates of other orders, within specific OrderStates.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            571 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            331 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            549 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            550 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X