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 iceman2018, Yesterday, 05:07 PM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by adaisguy, Today, 10:27 PM
          0 responses
          8 views
          0 likes
          Last Post adaisguy  
          Started by Jltarrau, Today, 10:18 PM
          0 responses
          8 views
          0 likes
          Last Post Jltarrau  
          Started by Option Whisperer, Yesterday, 09:55 AM
          4 responses
          30 views
          0 likes
          Last Post bltdavid  
          Started by Philippe56140, Yesterday, 02:35 PM
          2 responses
          21 views
          0 likes
          Last Post bltdavid  
          Working...
          X