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

memory issue

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

    memory issue

    I have an indicator which needs to run on a 1 tick chart. It works fine, but I need to refresh the indicator about evey 15 minutes because the indicator is accumulating too much data and my computer starts to slow down. I have an extremely fast computer with a solid state hard drive, so more / better hardware won't solve my problem.

    Is there a way I can limit how much data is stored for my indicator? I have already selected "1 day" in the "Days to load" of the data section of Data Series. I would like to keep NT from remembering the data that is roughly more than 1,000 bars old.

    Thanks,

    Safetrading

    #2
    Hello safetrading,

    Thanks for your note.

    The amount of data being accessed by an indicator and that will be stored in memory can be controlled through the Maximum Bars Look Back in the indicator parameters.

    By default this is set to 256.

    Below is a link to the help guide on Working With Indicators. Please refer to the section 'How to edit an indicator's parameters'. There it has a definition for Maximum Bars Look Back.
    http://www.ninjatrader.com/support/h...indicators.htm

    Setting this value lower will ensure that less data is stored in memory for this indicator.

    Also, it is not possible to remove historical data from a chart other than changing the amount of Days to load. This means that there will always be at least the current days bars loaded on the chart. The full amount of data on a chart, however, is not all being used for an indicator.


    Please let me know if this does not resolve your inquiry.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I already am using the 256 paramater for the lookback period which leaves me with my current situation. I just tried to put a smaller number in, but can't seem to find one that it will accept, I keep getting an error when I try to compile the indicator. I tried 64 and 128.

      Any other way to to shorten the lookback period to less than 256?

      Comment


        #4
        Please disregard my last question, I see from looking over the link you sent me the lookback period doesn't appear to have anything to do with the saving of indicator values, only the calculation. I did however see that values of a DataSeries, which if I understand correctly, the price bars fall into that catagory, will hold all indicator values for bars which appear in the chart. So in my case since I can only load a minimum of one day of bars, my chart will be holding all of my indicator values for the entire trading day. So I guess I just have to keep refreshing my indicator every 15 minutes or so.

        Thanks,

        Safetrading

        Comment


          #5
          Originally posted by safetrading View Post
          Please disregard my last question, I see from looking over the link you sent me the lookback period doesn't appear to have anything to do with the saving of indicator values, only the calculation. I did however see that values of a DataSeries, which if I understand correctly, the price bars fall into that catagory, will hold all indicator values for bars which appear in the chart. So in my case since I can only load a minimum of one day of bars, my chart will be holding all of my indicator values for the entire trading day. So I guess I just have to keep refreshing my indicator every 15 minutes or so.

          Thanks,

          Safetrading
          If you want to, you can load fewer bars than one day: just use the User Dialog to specify the exact number of bars that you want to load.

          Comment


            #6
            Thanks so much, I never paid attention that there was a drop down menu, I thought I could only select days to display. Easy fix. Thanks again.

            Safetrading

            Comment


              #7
              Hello safetrading,

              Thanks for your reply.

              You are correct. The indicator values will be calculated and then the post calculation values will be saved to a dataseries. This dataseries will be the same size as the primary dataseries (the bars on the chart).

              When refreshing the indicator (by right-clicking the chart and selecting Reload NinjaScript or by removing and reading the indicator) the indicators dataseries (the Value dataseries) will have to be rebuilt for all of the historical data. This means it will have to do all of the calculations again and save those values to the Value dataseries for each bar of historical data.

              Refreshing the indicator will not remove the historical values of the Value dataseries from memory. It will only cause it to recalculate the values and recreate the dataseries.

              Also, koganam, thank you for your input here. The Load data based on Bars is something I overlooked that would be very helpful.

              Please let me know if this does not resolve your inquiry.
              Last edited by NinjaTrader_ChelseaB; 04-15-2013, 02:22 PM.
              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by rocketman7, Today, 01:00 AM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by wzgy0920, 04-23-2024, 09:53 PM
              3 responses
              76 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by JonesJoker, 04-22-2024, 12:23 PM
              9 responses
              46 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by timko, Today, 06:45 AM
              1 response
              7 views
              0 likes
              Last Post gaz0001
              by gaz0001
               
              Started by Waxavi, 04-19-2024, 02:10 AM
              3 responses
              41 views
              0 likes
              Last Post gaz0001
              by gaz0001
               
              Working...
              X