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 jaybedreamin, Today, 05:56 PM
          0 responses
          3 views
          0 likes
          Last Post jaybedreamin  
          Started by DJ888, 04-16-2024, 06:09 PM
          6 responses
          18 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by Jon17, Today, 04:33 PM
          0 responses
          1 view
          0 likes
          Last Post Jon17
          by Jon17
           
          Started by Javierw.ok, Today, 04:12 PM
          0 responses
          6 views
          0 likes
          Last Post Javierw.ok  
          Started by timmbbo, Today, 08:59 AM
          2 responses
          10 views
          0 likes
          Last Post bltdavid  
          Working...
          X