Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problems with Ninjatrader hanging

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

    Problems with Ninjatrader hanging

    Hi,
    Lately, I have been getting some serious issues with Ninjatrader. I have primarily had two main usability problems:

    1) The software keeps hogging up memory. At one stage it was using 25+GB memory so I closed down everything and restarted the software.
    2) When I am using the software and switching symbols (as I trade equities) the software literally freezes. None of the windows can accept any input or mouse clicks and either the software crashes or I have to go to the task manager and kill the Ninjatrader process.
    3) Combination of 1) and 2)

    I had thought Ninjatrader 8 was more stable than Ninjatrader 7 but I now no longer share that belief. How can I use this software for trading when I am getting serious problems??? I hate to imagine being in a trade and suffering from these problems.
    Thanks,
    iq

    #2
    Hello iq200,

    1. This could indicate a memory leak somewhere. Am I correct memory usage increases continuously after NinjaTrader has been started? Do you recall when the issue started to occur? Did you install any new indicators or add-ons around that time?

    If you run NinjaTrader in safe mode, do you experience the high memory usage? Safe Mode will prevent NinjaTrader from:

    - Loading workspaces.
    - Connecting on start-up.
    - Loading custom assemblies.
    - Getting instrument updates from the server.

    To enable safe mode, please use the following steps:

    - Exit NinjaTrader.
    - Hold the CONTROL key and double click the NinjaTrader icon.
    - Keep the CONTROL key held down until you see the Control Center.
    - You can verify you are in safe mode by going to Help -> About.

    2. This is likely related to #1. Because memory usage is that high, NinjaTrader becomes sluggish and freezes.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Hi Jason,
      Thanks for your reply.
      I have been using some new indicators. Are you saying the memory leak is in Ninjatrader or in the indicator?
      Thanks,
      iq

      Comment


        #4
        Hello iq200,

        I suspect the memory leak is in one of the indicators. If there was a memory leak within NinjaTrader itself, we would have seen reports from other customers as well.

        I suggest to close your current workspaces and create a new empty workspace. Create a chart and add one of the indicators. Check if memory continuously increases. If not, please remove the indicator from the chart and restart NinjaTrader. Add another indicator and check memory usage again. Repeat these steps until you find the culprit.
        JasonNinjaTrader Customer Service

        Comment


          #5
          Thanks Jason. A question though .... Does Ninjatrader force any garbage collection while running and if so what points during the daily use lifecycle? I noticed that one of the indicators I am using (dled off the internet) is allocating a couple of stacks and adding objects to them but does not physically remove or delete any objects. I assume the stack collections get renewed each time I change symbol so would these not get eliminated by the garbage collector when changing the symbol?

          Comment


            #6
            Sorry I am not sure what is referred with "garbage collection". Could you please clarify?
            JasonNinjaTrader Customer Service

            Comment


              #7
              Ninjatrader is built on the dot net framework. Unlike C++, any allocated memory e.g for objects, lists and collections etc allocated from the heap is not destroyed explicitly by the developer but left to the dot net framework to manage/destroy as needed (garbage collection) once the list or object is not required and has been marked for removal. However you can call explicitly into the dot net framework to force a garbage collection and remove any memory that has been marked for removal by an app and cleanup sooner than the dot network would normally do the garbage collection.

              Comment


                #8
                NinjaTrader does not force garbage collection. It is also not advised to force garbage collection through custom code as this may cause performance issues. Restarting the platform would be the best method to free up memory.

                Comment


                  #9
                  Thanks for your help Patrick/Jason. I'll investigate further.

                  Comment


                    #10
                    Hello, I am posting here to continue the discussion on memory leaks. I'm running NinjaTrader 8.0.9 64-bit on Win 10.

                    I've been plagued with memory leak issues for months and I can't seem to find a solution.

                    Everything can be running fine for many hours, then suddenly, memory usage steadily climbs to the point where NT8 becomes unresponsive or freezes (sometimes it's just one NT window that freezes. Other times, it happens very quickly upon opening the platform. It's very inconstant and hard to reproduce on command. Usually there isn't an error produced (nothing in the trace/log files), just steady memory usage and freezing, with an eventual need to kill it from task manager.

                    I have custom bar types, indicators, drawing tools, etc. so I am hitting upon many areas of the platform.

                    I've gone through all my code to make sure I am explicitly disposing anything that is created new, but obviously there is something else that I'm missing.

                    I'm still not convinced that it's something I'm doing wrong. However, are there any tools that anyone can recommend to determine the source of the leak? I tried one tool, but it simply freezes along with NT, which is fun.

                    Any other recommendations of things to look for into the code as to a source of leakage?

                    Any help is greatly appreciated!

                    Comment


                      #11
                      Hello neoikon,

                      Unfortunately I am not aware of such tools. Perhaps other users know of a tool that could help you in this regard.

                      When you experience the leaks, is there an indicator, bar type or drawing tool that is always present in your setup?

                      Do you recall what new indicators, bar types or drawing tools you created around the time you experienced the issue first?
                      JasonNinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by neoikon View Post
                        Hello, I am posting here to continue the discussion on memory leaks. I'm running NinjaTrader 8.0.9 64-bit on Win 10.

                        I've been plagued with memory leak issues for months and I can't seem to find a solution.

                        Everything can be running fine for many hours, then suddenly, memory usage steadily climbs to the point where NT8 becomes unresponsive or freezes (sometimes it's just one NT window that freezes. Other times, it happens very quickly upon opening the platform. It's very inconstant and hard to reproduce on command. Usually there isn't an error produced (nothing in the trace/log files), just steady memory usage and freezing, with an eventual need to kill it from task manager.

                        I have custom bar types, indicators, drawing tools, etc. so I am hitting upon many areas of the platform.

                        I've gone through all my code to make sure I am explicitly disposing anything that is created new, but obviously there is something else that I'm missing.

                        I'm still not convinced that it's something I'm doing wrong. However, are there any tools that anyone can recommend to determine the source of the leak? I tried one tool, but it simply freezes along with NT, which is fun.

                        Any other recommendations of things to look for into the code as to a source of leakage?

                        Any help is greatly appreciated!
                        How are you disposing of the objects?

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by XXtrader, Yesterday, 11:30 PM
                        2 responses
                        11 views
                        0 likes
                        Last Post XXtrader  
                        Started by Waxavi, Today, 02:10 AM
                        0 responses
                        6 views
                        0 likes
                        Last Post Waxavi
                        by Waxavi
                         
                        Started by TradeForge, Today, 02:09 AM
                        0 responses
                        11 views
                        0 likes
                        Last Post TradeForge  
                        Started by Waxavi, Today, 02:00 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post Waxavi
                        by Waxavi
                         
                        Started by elirion, Today, 01:36 AM
                        0 responses
                        7 views
                        0 likes
                        Last Post elirion
                        by elirion
                         
                        Working...
                        X