Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Charts Freezing

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

    Charts Freezing

    My charts are freezing on NT 8. This is happening once or twice per day, on some days not at all. It seems to happen during times of high volume for the only instrument I am trading, the ES futures contract. For example, today 6/21/23, it happened at about 11:15 AM Central Time. On my workspace, picture attached, I am trading three different accounts, so I have three charts, each chart runs chart trader, and three basic entry boxes, one for each account. I am getting real time data from Rithmic.

    On one of my charts I am using the EDS pug in to send data for six symbols to Ensign Windows charting software.

    When the charts freeze, I am unable to click on them, close them. minimize them, or maximize them. I am also unable to click on, close, minimize, or maximize the Control Center. However, I continue to see real time data on my Basic Entry boxes. So maybe it's not a problem with the data feed I am using?

    To resolve this, I have to close NT using Windows Task Manager and restart NT 8. It then runs with no problem.

    I am running NT 8 8.0.28.0 64-bit on a Windows 10 computer. i7-9750H processor, 16 GB RAM and a 500 GB hard drive. I have Verizon FIOS Gigabit Internet service. There is nothing else running on my computer except NT 8 and Ensign Windows. No anti virus software other than Windows Defender.


    Please offer any suggestions you have to address this problem. Thank
    you.
    Attached Files

    #2
    What custom indicators do you have running? This sounds like a deadlock condition.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      yes typical error ninjatrader , need to ninjatrader to fix that ,each time have this freeze happen , poor optimization

      Comment


        #4
        I get the same freezing issue after running a few optimizations, sometimes, not always. Other times it'll freeze up for no apparent reason. My optimizations are not memory hogs either, they usually only involve one variable and run in less than a minute or two. When I check RAM usage it's only about 50%+ during an optimization run. After multiple optimization runs (but not always) RAM usage is almost maxed out, 90%+. And it stays maxed out, even minutes after the optimization, it never comes back down to normal, which is about 30% running Ninja but at rest. When this happens I know it's a matter of time before it freezes.

        The biggest issue is I'm afraid to run any optimizations during market hours when I have multiple bots running. If it freezes up, I have to shut down, hence, if there are any live positions, they'll all be dumped, maybe at a loss. Not being able to use the platform as intended at ANY hour of the day is a HUGE issue. I've seen this same issue posted all over blogs and nothing seems to be done about it. If anyone has any decent workarounds until they can fix the bug I'm really frustrated by this issue which is happening all too often.

        I have reported the issue, and got an answer that suggested I not run optimizations during the time my strategies are running. That's ridiculous! Basically saying I can't run the platform as intended. I plan to add to the 16 GB RAM in desperation, but I think I read someone else did that and it didn't help. I think others refer to this issue as a memory leak. I'm not real tech savvy but any suggestions appreciated. I have checked 3rd party indicators and have turned them off visibly. I really don't think it's one of them as the issue is fairly predictable and happens even when I have data disconnected.

        Comment


          #5
          From my high level perspective,

          Its all depends on what a strategy is trying to do, and how much RAM is required for each optimization.

          With each optimization iteration... the strategy may demand more dynamic RAM.. and your PC becomes more sluggish.

          When all available RAM is consumed the application / PC freezes.

          However to combat the issue, Windows uses a process called "garbage collection" to reclaim consumed memory and make it available for use again. This process happens in the background and you usually don't have to care about it. However we shouldn't create more garbage RAM faster.. than garbage collection can make it available for re-use again. When this happens the application / PC become less and less usable.

          Ninjatrader uses this code property:
          // Disable this property for performance gains in Strategy Analyzer optimizations
          // See the Help Guide for additional information
          IsInstantiatedOnEachOptimizationIteration = false;

          ​If this is set to false, the strategy will not consume fresh RAM with each optimization iteration, but will re-use its current RAM allocation over and over.
          Optimizations run faster, not waiting for new memory allocations per optimization, and Windows RAM garbage collection is greatly improved by not having to reclaim so much used memory.

          To take advantage of IsInstantiatedOnEachOptimizationIteration = false, I code all strategy variables, objects, etc, to be initialized at State == State.DataLoaded.
          Its default is True, so you must make these code changes in the strategy to make this happen for you.

          I'm RAM aware at all times. You can use Windows Taskmgr.exe (select Performance tab / Memory) to monitor you RAM.
          I use Advanced SystemCare to tell me when its OK to run an optimization (aka PC has available RAM and CPU). There are lots of other PC monitoring alternatives
          Click image for larger version

Name:	RAM Uage.png
Views:	2023
Size:	28.1 KB
ID:	1260576

          This is what I do.

          The trick is watching the monitoring tool and noting how much more RAM is used at each stage

          For example:
          1. After you reboot and your PC calms down - RAM 25%
          2. Start Ninjatrader and Connect your Data Provider - RAM 45% (+ 20%)
          3. Open your Workspaces and Load Charts - RAM 70% (+25%)
          4. Run Strategy Analyzer - RAM 85% (+15%)
          If I need to:
          • Close the Strategy Analyzer Windows and tabs, to Free up RAM and make it available for windows garbage collection and then re-open new ones and use templates to rerun Optimizations.
          • Close Charts and Chart Tabs to free up RAM as well.
          • Close Other Windows applications not really being used (like tray items... iTunes, Steam, etc)

          Comment


            #6
            The way NT works with RAM is beyond my understanding. When I used to run optimizations on my potato PC, I had to restart NT and my PC every 3-5 hours. For some reason, NT didn't release the consumed memory even after the optimization was finished (where is garbage collector?), and with every new test, it consumed more and more memory. At that time, I was considering buying a second lifetime key just to have another copy of NT on a second PC, because the optimization made NT and PC unusable. Needless to say, trading live accounts and running optimizations at the same time was a really bad idea.
            Now when I trade, I do nothing. I don't want to lose money due to NT freezing or lagging.

            Comment


              #7
              I know your pain. If it was me, I would install https://www.iobit.com/en/advancedsystemcarefree.php and have it analyze your system and at least tell you what should be adjusted / cleaned in Windows to get it running in F1 condition again. Like have it remove junk temp files, clean / defrag registry and optimize your windows system to host NT. After that I would monitor the system RAM as outlined above. I don't know what kind of PC your have, but I do know that Windows needs regular cleaning to keep it running like new.

              Comment


                #8
                Hello Folks,

                After fighting with the RAM freeze for months, I believe I've figured out my issue. With suggestions from the Ninja support folks, I started looking at my strategies. My thought had been, since I did everything using the strategy builder interface, and they compiled and ran fine, it has to be a bug within Ninja platform. Still might be, but I've now got my RAM dumping off as it should. I can optimize until the cows come home with no issues. I watch it dump off using "task manager" "performance tab". Problem was, RAM would go up, and NEVER come down, even an hour after the optimization was done.

                OK, what I found as my issue is this. I created a strategy template with about 3 dozen inputs (all are under the "Input" parameter entry area, not the "Variable" area which is below the input entry) that are used once in a while but not always. When I need them, they're there, no need to repeat adding them every time. Once I had strategies created, to create a new strategy, I'd open an existing one, and just rename it. Hence if there was an unknown issue, it was being copied over and over on all new strategies. So I "removed" all the variables on a strategy with exception to 4 of them. 2 Integers and 2 Doubles that I can use generical when I optimize. It worked! I tried to "break it" and I couldn't. RAM kept dropping off a cliff periodically during and after optimization. I now only have those 4 inputs, and for about 2 weeks have not had one freeze, not one RAM buildup.

                When I have time, I am going to go through all of those 3 dozen inputs I have on some strategies yet, and one by one eliminate them hoping to find the culprit. It still may be a platform clash with a particular input parameter, or how it's being used. My thought has always been if it compiles, it should be OK. Obviously there's something in my inputs that was causing RAM to misbehave.

                For now, my issue is resolved, as I've run hundreds of optimizations and many of them back to back to back. Now that I'm aware of the potential stored input/platform clash I'll be mindful of the possible connection. If and when I find out which input parameter is capable of causing the RAM issue, I'll post, as well as letting the Ninja support team know in the event it's a glitch.

                Just a side note. One other issue I ran into, which isn't related to the RAM behavior issue, was trying to remove some input parameters. I'd get a message saying the input was currently being used and couldn't be removed. Happened on 4 of them and I know they're NOT being used on the strategy I'm trying to remove them from. That's an issue for another day for me, as it's not affecting performance in any way I'm aware of.
                Last edited by scottbadtke; 08-06-2023, 08:10 AM. Reason: Edited as I used the term variable and should have used "input"

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Today, 05:17 AM
                0 responses
                44 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                126 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                65 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                42 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                46 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X