Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Memory usage

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

    Memory usage

    Hello,

    I have my custom strategy which is now using 9 time frames - M30, M60, M90, M120, M180, M240, M360, M480 and M1440. M30 is my primary time frame (BarsArray[0]).

    This strategy for single instrument uses around 50-60 MB of RAM memory.

    I have prepared next version of this strategy where I have added 3 more time frames and nothing more. This time memory uses jumped to almost 150 MB for single instrument.

    I am giving "days to load" = 200 because I need such period for M1440 calculations.

    Do you have any suchestions how can I make memory usage be not so big. For M1440 I need 200 days but for M15 or M60 I need not more than 2 or 5 days to load.

    Please support.

    #2
    Hi kucharek, thanks for the post - unfortunately there would currently not be an add method that would allow for the specification of loaded amount of data, it would all depend on the primary series and then 'days to load' setting here. Do you use a lot of internal DataSeries objects? If possible please run those with the default 256 lookback as opposed to infinite, which should be sufficient for most cases.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thank you for quick reply. I do not understand exactly your post. Can you explain it in more details.

      I am using days to look back = 265 (by default).

      My primary bar object is the smallest timeframe. In first case it was M30, second case is M15, because I added M15, M20 and M45.

      Is this normal situation that memory usage jumped so much?

      Comment


        #4
        Which days to load settings were you using prior to that latest change? If you're increasing that greatly to cover the 1440 min highest frame I would not find it unusual.

        My point was related to custom data series those can be set to infinite and a 256 lookback period. If you're using 256 already then there would be nothing further to optimize here, except perhaps reviewing code closely and seeing if your were liberal in your use of the DataSeries object where variables could have sufficed.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I do not change days to load. It is 200 all the time.

          Comment


            #6
            Thanks, I misunderstood you initially - thought you were adding in the 1440 min, but you're actually adding in two finer series than your old primary for case 1. Those would have increasingly finer data points held in memory, eventhough at base all your bars objects used would be build from 1 min base data.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              So do I understand right that nothing can be done here?

              I thought about solution that I load 200 days for my primary data which can be M1440 or D1 but for smaller periods like M15 or M30 I load much less data - eg. 5 days. Is it possible somehow?

              Do you have any suggestions for me?

              I need 200 days for daily bars because I calculate there fibo levels which I need for setups which I look for at small timeframes. But for this setups I do not need so many data.

              Comment


                #8
                You are unfortunately correct, would not have another approach here to point you to. However we have more flexibility planned in this area.

                The daily info you seek would it change often or is it a fib made up of longer term price points that could be alternatively supplied to the script so you don't need the 1440min?
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  On daily bars I have simple custom indicator which calculated inner fibo retracements - 6 levels for long and 6 levels for short.

                  In older version of the script I had those level supplied manualy to the script. I decided to prepare custom indicator because it took to much time to enter them every day to the strategy for 18 instruments I am interested in right now. Second problem was that the day ends at night so I am not able to do this work every day in the middle of the night.

                  Are there any other options to supply those levels to the script?

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by algospoke, Today, 06:40 PM
                  0 responses
                  9 views
                  0 likes
                  Last Post algospoke  
                  Started by maybeimnotrader, Today, 05:46 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post maybeimnotrader  
                  Started by quantismo, Today, 05:13 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post quantismo  
                  Started by AttiM, 02-14-2024, 05:20 PM
                  8 responses
                  168 views
                  0 likes
                  Last Post jeronymite  
                  Started by cre8able, Today, 04:22 PM
                  0 responses
                  10 views
                  0 likes
                  Last Post cre8able  
                  Working...
                  X