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 Aviram Y, Today, 05:29 AM
              0 responses
              1 view
              0 likes
              Last Post Aviram Y  
              Started by quantismo, 04-17-2024, 05:13 PM
              3 responses
              25 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by ScottWalsh, 04-16-2024, 04:29 PM
              7 responses
              34 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by cls71, Today, 04:45 AM
              0 responses
              6 views
              0 likes
              Last Post cls71
              by cls71
               
              Started by mjairg, 07-20-2023, 11:57 PM
              3 responses
              216 views
              1 like
              Last Post PaulMohn  
              Working...
              X