Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Limit to calling TriggerCustomEvent()

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

    Limit to calling TriggerCustomEvent()

    I have a strategy that uses the TriggerCustomEvent method. When a timer event is triggered it calls TriggerCustomEvent similar to your example: http://www.ninjatrader-support2.com/...ead.php?t=5965

    I get an error message after its called 100 times. Is this limitation 100 times per bar?

    **NT** Error on triggering custom event for strategy 'CT/1c12a251cdf14ec9ae551d3dbc8b127c': More than 100 subsequent user events

    Thanks.

    #2
    Someone will post a response tomorrow.
    RayNinjaTrader Customer Service

    Comment


      #3
      Your strategy logic triggers as cascade of more than 100 embedded On... method calls driven by one event. There is a significant likelyhood that this is unintended as it probably is a non-aborting, recurring logic. Hence the error.

      You needed to debug your strategy in order to resolve the issue.

      Comment


        #4
        I attached an example strategy so you can easily reproduce this behavior. There isn't a bug in the strategy.

        Since the markets are closed today it is even easier to reproduce since we're trying to trigger 100 events in one bar. Just apply this strategy to a chart that is not updating and it will cause the error below.

        **NT** Error on triggering custom event for strategy 'ExampleTCE/41bbb2cda5d94f74b1a624c90a65b6ec': More than 100 subsequent user events

        My question is why do you have this limitation in the first place?
        Attached Files

        Comment


          #5
          This logic is in place to notify users who coded non-terminating, recursive logic which easily could happen when using the TriggerCustomEvent logic.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          605 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          351 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          560 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          561 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X