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

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 xiinteractive, 04-09-2024, 08:08 AM
          7 responses
          27 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by Skifree, Today, 03:41 AM
          2 responses
          8 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by trimpy, Today, 04:38 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by dpolyakov, 03-29-2024, 11:30 AM
          4 responses
          150 views
          2 likes
          Last Post NinjaTrader_RyanS  
          Started by traderqz, Today, 12:06 AM
          1 response
          2 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X