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 PaulMohn, Today, 05:00 AM
          0 responses
          7 views
          0 likes
          Last Post PaulMohn  
          Started by ZenCortexAuCost, Today, 04:24 AM
          0 responses
          6 views
          0 likes
          Last Post ZenCortexAuCost  
          Started by ZenCortexAuCost, Today, 04:22 AM
          0 responses
          3 views
          0 likes
          Last Post ZenCortexAuCost  
          Started by SantoshXX, Today, 03:09 AM
          0 responses
          16 views
          0 likes
          Last Post SantoshXX  
          Started by DanielTynera, Today, 01:14 AM
          0 responses
          5 views
          0 likes
          Last Post DanielTynera  
          Working...
          X