Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

    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.

        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 yertle, Today, 08:38 AM
          0 responses
          4 views
          0 likes
          Last Post yertle
          by yertle
           
          Started by Mestor, 03-10-2023, 01:50 AM
          15 responses
          378 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by samish18, Yesterday, 08:57 AM
          10 responses
          27 views
          0 likes
          Last Post samish18  
          Started by matty89, 03-02-2020, 08:31 AM
          34 responses
          3,039 views
          1 like
          Last Post NinjaTrader_BrandonH  
          Started by kujista, Today, 05:44 AM
          3 responses
          14 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X