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

DataSeries Class - How to limit the number of Bars in memory

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

    DataSeries Class - How to limit the number of Bars in memory

    I'm using several DataSeries and IntSeries and this is causing the strategy to use too much memory.

    How can I limit the number of bars saved into the DataSeries to say the last 100 bars?

    Does DataSeries implement Dispose?


    Thanks
    John

    #2
    You cannot limit the number of bars saved. DataSeries objects are disposed.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh but I have a follow up.
      When testing I get a out of memory error due to the number of DataSeries in the program and the the large number of bars during testing.

      Is there a way to manually to free resources?

      Or
      Do I need to make my own List Class that manages memory?

      Thanks Again
      John

      Comment


        #4
        John,

        No way to manually free resources. You may want to use a List in your instance or you can try decreasing the backtest time frame to reduce the processing intensity.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          NT Version 7 will have by default a 256 slot limitation on data series as default which will make a substantial difference in memory management, this can be overridden to an infinite slot size (such as we have now) should you need it.
          RayNinjaTrader Customer Service

          Comment


            #6
            Thanks Josh. I'm glad to hear about the enhancement in NT7 and look forward to it.

            Comment


              #7
              Originally posted by NinjaTrader_Ray View Post
              NT Version 7 will have by default a 256 slot limitation on data series as default which will make a substantial difference in memory management, this can be overridden to an infinite slot size (such as we have now) should you need it.
              This is awesome!

              Mike

              Comment


                #8
                Hi Josh,
                I'm looking for some advice on proceeding with my project at this point I could wait to see if NT7 will fix some of my issues or re-code without using DataSeriese. Could you answer the following to help with my decision?

                1) When can expect to be able to get NT7?

                2) Will NT7 support 64bit i7 processors with larger than 2G user spaces? Currently I have a i7 64 bit dual quad core with 8 GB RAM.

                3) Since user spaces are limited to 2GB currently. I'd like to use the /3GB windows startup option. How do I link NT with /LARGEADDRESSAWARE option so I can get a extra 1GB of space?

                4) Is it possible to have one of your development engineers handling memory enhancement on NT7 to contact me directly? I know some of this is advanced programming but it's important to handle larger programs in your product and I think this could be helpful to both of us.

                Thanks
                John

                Comment


                  #9
                  1. Slotted for end of Q2.

                  2. You can already use 64 bit machines with NinjaTrader. Now this is not officially supported yet, but many of our customers use it with great success every day.

                  3. Unfortunately this is not supported.

                  4. John, development is already working on memory enhancements and such. They are already aware of user requirements for better handling on these aspects.
                  Josh P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by trilliantrader, 04-18-2024, 08:16 AM
                  4 responses
                  18 views
                  0 likes
                  Last Post trilliantrader  
                  Started by mgco4you, Today, 09:46 PM
                  1 response
                  7 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by wzgy0920, Today, 09:53 PM
                  0 responses
                  9 views
                  0 likes
                  Last Post wzgy0920  
                  Started by Rapine Heihei, Today, 08:19 PM
                  1 response
                  10 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by Rapine Heihei, Today, 08:25 PM
                  0 responses
                  10 views
                  0 likes
                  Last Post Rapine Heihei  
                  Working...
                  X