Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator update script help needed

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

    Indicator update script help needed

    I want to update an indicator at session end, or a defined period immediately after session end, so I don't have to wait for the next session and nextbar to trigger the update. I also want it to update even if I startup after the specified time yet still prior to the next session start or nextbar.

    Can this be achieved with GetNextBeginEnd or any other work around?

    I would appreciate a sample script for an explanation.

    thanks

    #2
    Hello,

    You can use your own custom trigger event to trigger an update at a user defined interval:



    We have a reference sample which uses TriggerCustomEvent() to output information at a specific interval:

    MatthewNinjaTrader Product Management

    Comment


      #3
      Its currently done OnBarUpdate() for example on a 1 hour interval during a session, but I want it updated at session end also, instead of waiting for the next session to start.
      I'm not a programmer so I need a firm answer indicating what options one can use to achieve it.

      Comment


        #4
        Hello,

        You can create a custom timer event to trigger at the end of the session.

        You can use GetNextBeginEnd to get the DateTime value at the end of the session to pass into your timer.

        We do not have a specific sample that I can provide to you, but this should help get you started.

        If you have limited time or programming capabilities, you can discuss your requirements with any of our certified NinjaScript consultants.
        Click here for a list of certified NinjaScript Consultants
        MatthewNinjaTrader Product Management

        Comment


          #5
          Originally posted by 35trader View Post
          Its currently done OnBarUpdate() for example on a 1 hour interval during a session, but I want it updated at session end also, instead of waiting for the next session to start.
          I'm not a programmer so I need a firm answer indicating what options one can use to achieve it.
          Using ToTime might help you

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          598 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
          555 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X