Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator processing

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

    Indicator processing

    My indicator seems to work only on visible bars on the chart. Is there a way i can make it calculate over period we cant see on the chart (the non visible bars)?

    The problem the more data is computed the more reliable is the indicator. I cannot fit in the chart volume 10 for 10 000 bars. I wish it would be possible to see those invisible bars.

    Would it be possible to make my indicator calculate on a volume 10, 2 days chart and get the answer to be showed by transferring it on an other 15 minutes chart?

    Thank you

    #2
    Hello frankduc,

    It looks like this is not related to your original post, please ensure to create new a thread if you have a new unrelated question. I have moved this to a new thread.



    Comment


      #3
      Hello frankduc,

      It is normal for an indicator to calculate all bars that were loaded. That includes the not currently rendered past bars which were loaded, or also known as historical bars. Are you referring to historical bars or bars which are not loaded?

      If you mean data that was not loaded, you will need to load that data before you can use it. The OnBarUpdate override will only run for bars you have loaded.

      Please let me know if I may be of further assistance.

      Comment


        #4
        On the attach chart you can see the scroll bar it stop at 11 august. Meaning there is 3001 bars on the chart but only 1837 can be seen on the chart you have to scroll to the left to see the rest.
        My indicator will stop working at 1837 and even if it was working beyond i would still be unable to see those bars unless i change the period for 3 minutes for exemple.

        Unless i am wrong and by moving the chart i accidently stop the indicator from calculating it seem to me it will only calculate the visible bars. By the way my indicator is calculated onRender.

        That is why i am asking if its possible
        to make my indicator calculate on a volume 10, 2 days chart and get the answer to be showed by transferring the result to a other 15 minutes chart?

        Thanks
        Attached Files

        Comment


          #5
          Using OnRender to calculate on visible bars (leftmost to rightmost) would limit the bars you can use. You need to do the calculations for all bars in OnBarUpdate or not on just visible bars in OnRender.
          eDanny
          NinjaTrader Ecosystem Vendor - Integrity Traders

          Comment


            #6
            Hello frankduc,

            eDanny is correct here. OnRender is used specifically to go over the bars that are visible and specifically for what you need to draw on the chart. If you need to process all available bars, your calculations should be performed in OnBarUpdate.

            OnRender best practices are to loop through ChartBars.FromIndex and ChartBars.ToIndex for the bars that are visible. Modifying a loop like this to calculate beyond the visible range is possible, but not necessarily recommended. This would be controlled by however you loop over bar indexes.




            Please let us know if you have any questions.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            599 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            345 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            558 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            558 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X