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 Shansen, 08-30-2019, 10:18 PM
          24 responses
          938 views
          0 likes
          Last Post spwizard  
          Started by Max238, Today, 01:28 AM
          0 responses
          3 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by rocketman7, Today, 01:00 AM
          0 responses
          2 views
          0 likes
          Last Post rocketman7  
          Started by wzgy0920, 04-20-2024, 06:09 PM
          2 responses
          27 views
          0 likes
          Last Post wzgy0920  
          Started by wzgy0920, 02-22-2024, 01:11 AM
          5 responses
          32 views
          0 likes
          Last Post wzgy0920  
          Working...
          X