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.

            JimNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by gustavobp, Today, 05:30 AM
            0 responses
            4 views
            0 likes
            Last Post gustavobp  
            Started by artsi_lucky, 11-19-2024, 01:20 PM
            3 responses
            79 views
            0 likes
            Last Post artsi_lucky  
            Started by max1ci6, 02-12-2025, 04:06 AM
            4 responses
            36 views
            0 likes
            Last Post max1ci6
            by max1ci6
             
            Started by rtwave, 02-05-2025, 07:33 AM
            3 responses
            33 views
            0 likes
            Last Post Ashwin
            by Ashwin
             
            Started by MamaKB, Yesterday, 03:38 PM
            2 responses
            14 views
            0 likes
            Last Post MamaKB
            by MamaKB
             
            Working...
            X