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 CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            24 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            121 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            179 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            92 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by cmoran13, 04-16-2026, 01:02 PM
            0 responses
            136 views
            0 likes
            Last Post cmoran13  
            Working...
            X