Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Analyzer has become slow, what's wrong?

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

    Strategy Analyzer has become slow, what's wrong?

    Hi,
    from one day to the next my strategy analyzer has become unusually slow. I am running 3600 iterations here on a 12 range chart of NQ, time frame close to 1 year. This used to be done in a few mins. Now it take multiple hours. I have worked a lot with NT in the past days, so am not really sure, if I did anything that has changed some setting or so leading to this.

    My CPU and mem are not fully utilized either.
    Click image for larger version

Name:	image.png
Views:	471
Size:	101.8 KB
ID:	1286304Click image for larger version

Name:	image.png
Views:	466
Size:	41.2 KB
ID:	1286305

    #2
    I tested with the sample MA crossover strategy on a 1 min chart for 1 year. This takes about 5 mins now. It would have taken less than 1 min, maybe 15 secs before. I don't know what happened that it is now so slow.
    Click image for larger version

Name:	image.png
Views:	433
Size:	75.4 KB
ID:	1286313

    Comment


      #3
      Hello philmg,

      Thank you for your post.

      What kind of tests have you been running in the past few days, have they been backtests? Or optimizations? Has the time frame for these tests all been over a year?

      From your screenshot, it looks like you are using range bars which backtested over a year would be a large amount of tick data.

      What OS are you using? Are you using a VPS?

      Please see this Help Guide page which discusses factors that can affect optimization performance:

      https://ninjatrader.com/support/helpGuides/nt8/index.html?optimize_a_strategy.htm#UnderstandingFa ctorsThatAffectOptimizationPerformance



      Computer memory is important for long resource-intensive tests that generate a large number of trades without your machine stalling. Computer processor speed is important to get optimization iterations done quickly and the number of CPU cores allows for more iterations to run simultaneously.

      We should consider the following for memory consumption:

      Data * Strategy resources * Number of backtest/optimization iterations * Number of trades * Keep best # of results (when optimizing).

      With more complex code can come heavier calculations which may require more processing. This is further impacted by the amount of data being processed, the number of iterations in the optimization, and amount of new objects being created in each iteration.

      It is important to note that the Tick Replay property implies that more PC resources are used to calculate your indicators and strategies also and as a result will lead to a performance impact. This is noted on the Tick Replay and Performance Tips help guide pages below.


      Tick Replay:https://ninjatrader.com/support/help...ick_replay.htm

      Performance Tips:https://ninjatrader.com/support/help...ance_tips2.htm



      To improve backtests/optimization, you could reduce the amount of days being tested over to reduce the data being processed. You could also reduce the number of iterations by reducing the range of optimized parameters when running an optimization.

      Further, when running an optimization use IsInstantiatedOnEachOptimizationIteration set to false and reset all objects that can be reset or instantiate all objects in State.DataLoaded. By doing so this will re-use memory locations instead of reserving new memory locations.

      See the help guide documentation below for more information about running optimizations.

      IsInstantiatedOnEachOptimizationIteration —https://ninjatrader.com/support/help...niteration.htm
      Optimization Tips —https://ninjatrader.com/support/help...ionPerformance
      Walk Forward Optimization —https://ninjatrader.com/support/help...ss_metrics.htm
      Genetic Optimization —https://ninjatrader.com/support/help..._algorithm.htm

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      61 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      40 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      21 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      23 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      51 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X