Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TriggerCustomEvent() question

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

    TriggerCustomEvent() question

    Hi there,

    I am currently writing error-handling code for my strategy. One of the thing I have done (& it works ok) is to register my own PowerModeChangeEventHandler() to deal with PC going 'Suspended' on UPS signaled power failures.

    Since I didn't use TriggerCustomEvent() in doing this, and my code works OK, I am wondering what is the real purpose of this TriggerCustomeEvent() - is it just limited to mapping CurrentBar/High/Low/etc. dataseries to a particular timeframe/bar series (which isn't really required as long as one is using the multi-timeframe CurrentBars[]/Highs[]/Lows[]/etc), or does it do more than this, and if so what ?

    Thanks in advance
    Dominique

    #2
    Dom,

    Good morning.

    Biggest thing this is here for is to make sure you do not trigger a custom event while you are in the middle or processing a bar and wait for bar processing to complete and queue the event until it is ready to be handled and all DataSeries calculations or complete.
    BrettNinjaTrader Product Management

    Comment


      #3
      Brett,

      Can you explain in more details, what this means "NinjaTrader will synchronize all internal pointers"..



      Also what this means in regards to the 'barsIndex' parameter.

      If not, can you put in a request that the documentation be expanded to clarify.

      Thanks

      Comment


        #4
        I will put in your request for the documentation to be expanded in this area.
        BrettNinjaTrader Product Management

        Comment


          #5
          OK, now I get it ... good thing I asked the question!

          Thanks much
          Dominique

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          595 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          343 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          556 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          554 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X