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 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.



    JesseNinjaTrader Customer Service

    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.
      JesseNinjaTrader Customer Service

      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.
            JimNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by r68cervera, Today, 05:29 AM
            0 responses
            2 views
            0 likes
            Last Post r68cervera  
            Started by geddyisodin, Today, 05:20 AM
            0 responses
            3 views
            0 likes
            Last Post geddyisodin  
            Started by JonesJoker, 04-22-2024, 12:23 PM
            6 responses
            35 views
            0 likes
            Last Post JonesJoker  
            Started by GussJ, 03-04-2020, 03:11 PM
            12 responses
            3,239 views
            0 likes
            Last Post Leafcutter  
            Started by AveryFlynn, Today, 04:57 AM
            0 responses
            6 views
            0 likes
            Last Post AveryFlynn  
            Working...
            X