Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Analyzer / Optimization Hanging during processing

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

    Strategy Analyzer / Optimization Hanging during processing

    OK, so I have a Strategy that I am running optimization on. There is no Charting, Printing, Painting or the like enabled on this.

    Here's what happens. It starts running and estimates about 5 minutes to complete, but here's what actually happens.
    It runs though about 15 - 20% of the iterations and hangs for a few minutes. Then makes progress though another 15-20%
    and hangs for a few minutes and so on. It finally get to the point where the computer is unresponsive and never completes.
    Looking at the resource usage in Task Manager CPU jumps between 15 and 30% and Memory usage is close to 13 GB of 16 GB.

    So then I have to reboot the computer and I am stuck trying to rerun the optimizer. This is a frequent occurance.

    My questions are:

    1. Why is it doing this (is this normal)?
    2. Is there any way to turn on debugging and look at a log that might tell me more information?
    3. Outside of running it on a smaller data set are there any other suggestions? I have turned off AntiVirus and am running no other
    applications on this computer.

    Any help would be appreciated. This is getting quite frustrating and is putting me far behind in my project.

    #2
    Hello ATMtrader0001,

    Thanks for your questions.

    Unless programmed to be compliant with setting IsInstantiatedOnEachOptimizatonIteration to false, each optimization iteration will create a new instance of the strategy and this greatly affects performance. To use this property, the strategy must reset all of its class level variables in State.DataLoaded.

    IsInstantiatedOnEachOptimizatonIteration documentation — http://ninjatrader.com/support/helpG...niteration.htm

    We also recommend disabling the use of drawing objects when backtesting/optimizing to get the best performance.

    Keep best # of results can also affect performance.

    As another tip, we suggest using a Genetic algorithm for very large optimizations and then to use a regular optimization to look into finer details once the scope of your optimization is focused and narrowed down.

    Additional tips for improving optimization performance can be found here - https://ninjatrader.com/support/help...ionPerformance

    You can take additional steps to comment your code and focus on segments where new objects are created, to reduce memory footprint, but I would suggest taking the approaches above first.

    We look forward to assisting.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    108 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    55 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    37 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    39 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    76 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X