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

Reset indicator each 60 minutes

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

    Reset indicator each 60 minutes

    How can I let a indicator reset himself each certain time and start his calculation from 0 again, for example each 15, 30 o 60 minutes (or what ever)?

    Any simple way to do this??

    Thanks

    #2
    Not sure I follow. An indicator bases it calcs of the chart data it runs on. If you're looking for blanking out the chart (data) every 60 mins, then sorry, this is not supported.

    Comment


      #3
      Let me explain this with a example because not shure if I explained myself correctly.

      Is it possible for example to add a piece of code to the CurrentDayOHL indicator so that in stead of him reseting himself each day the indicator resets himself each 30, 60 or whatever minutes, than I basically will get a new set of OHL marcs each 30 minutes for example (30 min OHL in stead of daily).

      Comment


        #4
        For sure this is possible. You would somehow have to mark values within the time ranges you specify. Working with Time[x] property will accomplish this. Short of doing the actual coding, we would not have a reference sample.
        RayNinjaTrader Customer Service

        Comment


          #5
          Thanks,

          It's a pitty there are no referance samples!
          Isn't there any NT indicatar doing this so I could have a look on it?

          I supose I must take somehow seccion begin as 0 valuo and from there on doing something like counting the minutes to the point I want (60min for example) and when that point is reached turn that point into 0 and do the same proces again, and again and again ...

          Maybe someone could be so kind and provide a example for this

          Thanks

          Comment


            #6
            By the way, just thought, this also could be achived mathematicly by referencing Bar.SinceSession, eaven this would be a complex and not so nice solution.

            Comment


              #7
              Hi whitegun,

              If you want an example try looking at the VWAP indicator. It is not the simplest code to do what you want, but it does do calculation resets somewhere in there.

              Your idea for referencing Bars.SinceSession will work too.
              Josh P.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by TraderBCL, Today, 04:38 AM
              2 responses
              12 views
              0 likes
              Last Post TraderBCL  
              Started by martin70, 03-24-2023, 04:58 AM
              14 responses
              105 views
              0 likes
              Last Post martin70  
              Started by Radano, 06-10-2021, 01:40 AM
              19 responses
              607 views
              0 likes
              Last Post Radano
              by Radano
               
              Started by KenneGaray, Today, 03:48 AM
              0 responses
              4 views
              0 likes
              Last Post KenneGaray  
              Started by thanajo, 05-04-2021, 02:11 AM
              4 responses
              471 views
              0 likes
              Last Post tradingnasdaqprueba  
              Working...
              X