Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Optimizer freezes NT8

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

    Optimizer freezes NT8

    The optimizer consumes a lot of RAM, but the thing is that when the optimization ends the memory is not released. You can check it easily from the task manager. So, if I do two or three optimizations in a row, all memory is consumed (8Gb) and NinjaTrader is frozen and I have to kill the process from the task manager and restart.

    #2
    Are your running this optimization on a built-in strategy or custom strategy?

    Could you provide a screenshot of your optimizer's settings so I can attempt to duplicate your test exactly?

    Comment


      #3
      I think I found the reason for the bug.

      My strategy uses date filters and Set methods to exit and I did not know if the problem lay there. But the problem is with Draw methods.

      If you optimize the attached strategy you will see the bug. Attached the settings also. It is sufficient to optimize only two parameters. In the Task Manager you will see that the memory is consuming and is never released, even if you restart the optimizer. You have to restart NinjaTrader.

      If you comment the Draw method, the bug disappears.
      Attached Files

      Comment


        #4
        Hello cls71,

        Thank you for bringing this to our attention. I was able to replicate and have forwarded this to development.

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Hi All,

          I can confirm that as of today, the Draw method is still freezing optimization backtests. My backtests were freezing my computer and as soon as I made those Draw methods comments, the backtest ran as it should. The problem is that I'm a visual type of person and I need to see my drawings on the charts. I hope this gets resolved soon.

          Comment


            #6
            Hello GeoOrtiz,

            The issue with the optimizer is that it has to create all the drawing objects and display them on the chart. Eventually “garbage collection” will run, which should drop memory usage.

            After you run the optimizer, if you wait 10 minutes does memory usage drop?

            A solution may be to have your strategy include a bool, which you could use to select whether or the strategy should draw objects. With this approach, if using the optimizer, you could omit drawing objects.

            Another approach would be to use OnRender, which only stores the vectors and should reduce memory usage.

            I look forward to your reply.
            Alan P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            110 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            59 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
            41 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            78 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X