Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Analyzer using all Memory

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

    Strategy Analyzer using all Memory

    My computer has 8 CPUs and 24 GB of RAM. When I first start my computer and start NT I see 2.4 GB as used with more than 21 GB available.

    When I run Strategy Analyzer with 405 iterations, then amount of RAM used jumps to 6.1 GB, but the memory is not released after it completes.
    Then if I run it again and ultimately the computer runs out of memory as Strategy Analyzer does not release the memory when completed.

    Is this a bug?

    #2
    It just happened again. NT is using 21 GB of RAM of the 24 GB and NT is now unresponsive even though the Strategy Analyzer completed 15 minutes ago.

    It is not releasing the memory. Closing Strategy Analyzer does no good. If it crashes I will have to rerun the Strategy Analyzer and may end up in this endless circle.

    How can this be addressed without restarting NT after every run on Strategy Analyzer?

    Comment


      #3
      It has now been almost two hours and NT is still using 21 GB of memory and is unresponsive.

      My only choice at this time is to kill the process and start all over.

      How can this be addressed?

      Comment


        #4
        Hello, thanks for writing in. One caveat of the Strategy Analyzer is that the garbage collector is disabled for performance reasons. Because of this, a strategy that demands a lot of resources, running on a large set of data with many optimization iterations, that keeps a large "Keep best # of results" can cause the memory to fill up. The best way to avoid this is to minimize these factors. The strategy demand is entirely up to the code being used, and the data set and "Keep best # of results" can be adjusted from the Strategy Analyzer user interface.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Thank you. I only keep the best 4. As I said the iterations are 405, so it is not that intensive.
          As for the data set how would I know how big the dataset is? I am only running YTD. Then
          backtest that against a longer timeframe.

          Comment


            #6
            Hi, the "Data set" is the total amount of data being optimized on. This is the date range that you select in the Strategy Analyzer. \

            Kind regards,
            -ChrisL
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              I get that.
              How does the Dataset change if I use a different Type?
              So, if I use a 30 second vs 1 minute (since there are twice as many datapoints in 30 sec vs 1 min),
              does that affect the Dataset, or does NT only look at the Dataset and Start Date - End Date?

              Comment


                #8
                Originally posted by ATMtrader0001 View Post
                It has now been almost two hours and NT is still using 21 GB of memory and is unresponsive.

                My only choice at this time is to kill the process and start all over.

                How can this be addressed?
                Standard NT8 behaviour.

                I now have 64GB of RAM.
                The setup lasts longer before requiring a restart.
                ​​​​​

                Comment


                  #9
                  Have you considered the suggestions here: https://forum.ninjatrader.com/forum/...6#post1254316? Maybe one or more of them will help make this less onerous.
                  Bruce DeVault
                  QuantKey Trading Vendor Services
                  NinjaTrader Ecosystem Vendor - QuantKey

                  Comment


                    #10
                    Most of them are already in place, except for the GC, though I don't see why I should have to run
                    GC manually. Doesn't NT properly Dispose of the variable? Good programming has you Dispose of the
                    variable after you are done with it, but since these variables persist until the script is stopped, there isn't
                    a Dispose (or Close) of the items. Unless there is a Dispose called at the end of a script run (Disable?).

                    Am I missing something? Why does NT not see that it is maxing out Memory and then run a GC on it's own?
                    You would think that if NT is running and say Memory Utilization is at > 75% and NT is usings > 50% that it
                    would initiate a GC on it's own.
                    Last edited by ATMtrader0001; 06-05-2023, 02:31 PM.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Karado58, 11-26-2012, 02:57 PM
                    8 responses
                    14,825 views
                    0 likes
                    Last Post Option Whisperer  
                    Started by Option Whisperer, Today, 09:05 AM
                    0 responses
                    1 view
                    0 likes
                    Last Post Option Whisperer  
                    Started by cre8able, Yesterday, 01:16 PM
                    3 responses
                    11 views
                    0 likes
                    Last Post cre8able  
                    Started by Harry, 05-02-2018, 01:54 PM
                    10 responses
                    3,204 views
                    0 likes
                    Last Post tharton3  
                    Started by ChartTourist, Today, 08:22 AM
                    0 responses
                    6 views
                    0 likes
                    Last Post ChartTourist  
                    Working...
                    X