NinjaTrader 8 Running Slow? Work the Cleanup Ladder Before You Reinstall

NinjaTrader 8 almost never gets slow all at once. It degrades. Charts that used to load in three seconds take thirty. Scrolling stutters. Memory creeps past three gigabytes by lunchtime. The platform takes two minutes to start. An indicator you just edited refuses to update, and the compiler throws errors on code that has not changed in months.

The instinct at that point is to reinstall. Resist it. A reinstall is the last rung on the ladder, not the first, and it costs you an afternoon. Worse, done the obvious way it usually fixes nothing, because the thing that is actually slow does not live in the program folder. It lives in Documents\NinjaTrader 8, and a standard uninstall does not touch that folder at all.

Work the ladder instead. Each rung is cheaper than the one after it, and most sluggish installs get fixed on rung one, five, or six.


Step 0: Back up first. Every single time.

Nothing below this line is reversible on its own. Before you delete anything:

  1. Disconnect from all connectivity providers.
  2. From the Control Center, go to Tools > Export > Backup File…
  3. Close NinjaTrader and copy the entire Documents\NinjaTrader 8 folder to an external drive.

The built-in archive covers configuration files, the database, historical chart data, log and trace files, market replay, NinjaScript files, templates, and workspaces. Because it includes market replay and historical data, it can run to many gigabytes. Give it time and give it disk space.

The restore path, when you need it, is Tools > Import > Backup File… from the same menu. Note that carefully, because there is a right time and a very wrong time to use it, and we come back to that at rung seven.

Step 0.5: Find out what is actually slow

Five minutes of measuring saves you an afternoon of deleting the wrong things.

  • Task Manager. Watch NinjaTrader.exe memory. A quiet platform with a handful of charts should sit comfortably under about 1.5 GB. If it climbs steadily all session, you have a leak, and leaks come from strategies and indicators, not from a dirty install.
  • Folder sizes. Right-click, Properties, on Documents\NinjaTrader 8\db, then the trace folder, then log. A trace folder measured in gigabytes is a smoking gun.
  • The Log tab in the Control Center. An error repeating every few seconds will drag the whole platform down, and no amount of cache clearing will help.
  • One chart or all of them? This single question decides which rung you start on. One slow chart is a chart problem. All charts slow is a workspace or install problem.

Rung 1: Clear the cache

Five minutes. Effectively zero risk. Start here.

The folder is Documents\NinjaTrader 8\db\cache. Everything in it is derived data that NinjaTrader rebuilds on demand. It is not your historical data and it is not your settings.

  1. Close NinjaTrader completely, then confirm in Task Manager that NinjaTrader.exe is actually gone. It often is not.
  2. Delete the contents of the cache folder. You can delete the folder itself; NinjaTrader recreates it at startup.
  3. Restart. Expect the first chart load to be slower than usual while the cache repopulates. That is normal, and it is a one-time cost.

If you run a lot of charts, doing this every weekend is reasonable housekeeping. Monthly is fine for most traders.

Rung 2: Prune log and trace, but check the size first

Documents\NinjaTrader 8\log and Documents\NinjaTrader 8\trace get one file per day and are never pruned automatically. They accumulate for as long as the install has existed.

Here is the honest version, which contradicts a lot of forum advice: clearing these folders will not speed up your platform unless something is writing very large files into them. If your trace folder is 80 MB, deleting it buys you nothing.

But that exception is common if you develop or run custom strategies, because every Print() call lands in trace. A runaway debug statement inside OnMarketData can write gigabytes in a single session, and at that point it genuinely is hurting you.

So check the size first. Under a few hundred megabytes, leave it alone. Multiple gigabytes, close NinjaTrader and delete everything except the current day’s files. Then fix the cause, because deleting the output without silencing the source just means you do it again next week. Strip debug prints out of production strategies, or gate them behind a user-settable bool.

Rung 3: Trim historical data, carefully

These are the folders people delete too eagerly:

  • db\day, db\minute and db\tick hold real downloaded historical data, organised into per-instrument subfolders. This is not cache.
  • db\replay holds Market Replay recordings, usually the single biggest consumer of disk in the whole install.

Do not reflexively wipe the tick folder. Many broker feeds limit how far back you can re-download tick data. What you delete may simply be gone, and if you backtest on ticks that is a real loss. Back it up separately before you touch it.

The sane approach is surgical rather than wholesale. Go in and delete the instruments you will never look at again: the expired contracts, the symbols you tested once and abandoned. Keep what you actually trade.

For replay, if you do not use Market Replay at all, that folder is free disk space. If you do use it, keep only the sessions you genuinely replay.

Control Center > Tools > Historical Data lets you see what you are holding before you start deleting. Afterwards, right-click any chart and choose Reload All Historical Data to pull fresh.

Rung 4: Force a full NinjaScript recompile

Reach for this one when the symptoms are code-shaped: phantom compile errors on untouched files, an indicator that stubbornly runs the old logic after you edit it, assembly errors at startup, or a NinjaScript Editor that has become unusable.

  1. Close NinjaTrader.
  2. Open Documents\NinjaTrader 8\bin\Custom.
  3. Delete the obj folder if one is present, plus NinjaTrader.Custom.dll and its matching .pdb file.
  4. Restart. NinjaTrader recompiles everything from source on startup.

Your source lives in the Indicators, Strategies and AddOns subfolders under bin\Custom. None of those are touched by the steps above. You are deleting build output, not code.

Two things to expect. First, the recompile takes a minute or two. Second, if you have broken third-party code sitting in your Indicators folder, the compile will now fail and everything stops working. That is not damage you caused. It was already broken, and the stale DLL was hiding it. Find the offending file, fix it or move it out, and recompile again.

For vendor add-ons that ship as compiled assemblies rather than source, use Control Center > Tools > Remove NinjaScript Assembly, then reinstall the vendor package cleanly.

Rung 5: Rebuild the chart

Charts rot. A chart that has been open, tweaked, duplicated and reused for a year quietly accumulates junk:

  • Indicator instances you removed from the panel but that still hold data series
  • Thousands of drawing objects, especially if a strategy or indicator draws to the chart
  • Extra data series added for a test two years ago and never removed
  • A Days to Load value that crept up and never came back down

The diagnostic: open a brand-new chart on the same instrument with nothing on it. If that loads fast, the chart is your problem, not the platform.

Try the cheap fixes on the existing chart before you rebuild:

  • Purge drawing objects. Right-click the chart, open Drawing Objects, and remove them all. A few thousand drawing objects will bring a chart to its knees on every repaint.
  • Turn off Tick Replay in Data Series unless a specific indicator genuinely requires it. This is the most expensive checkbox in the platform. It forces NinjaTrader to push every historical tick through your indicators on load.
  • Cut Days to Load to what you actually look at. Loading a year of tick data to trade off a 20-period average is pure overhead.
  • Audit the Indicators window for duplicates, and for entries that are present but disabled. Remove them properly rather than unchecking them.
  • Set Calculate to On Bar Close anywhere the logic tolerates it. On Each Tick across a dozen indicators is a self-inflicted wound.

If none of that moves the needle, rebuild. New chart, add the instrument, then add your indicators one at a time, checking load time as you go. That is not busywork. It is how you find the one indicator that is costing you twenty seconds.

One warning: do not shortcut the rebuild by applying your old chart template. The template carries the same rot forward. Build it by hand at least once, then save a fresh template from the clean result.

Rung 6: Rebuild the workspace

Workspaces are XML files in Documents\NinjaTrader 8\workspaces, and they get corrupted or bloated more often than people realise.

Symptoms that point here rather than at a single chart: slow startup across the board, windows opening off-screen or at the wrong size, NinjaTrader hanging on shutdown, high memory before you have done anything, and settings that refuse to stick between sessions.

The test: create a fresh workspace with one chart in it. If that is fast and responsive, your old workspace is the culprit.

  1. Screenshot the old workspace so you know what you are rebuilding.
  2. Use the Workspaces menu in the Control Center to create a new one.
  3. Rebuild it window by window, testing as you go.
  4. Once the new workspace is solid, move the old XML out of the workspaces folder rather than deleting it. Keep it somewhere safe for a few weeks.

While you are here, be honest about scale. NinjaTrader loads every chart in every open workspace. If you keep five workspaces and forty charts live simultaneously, that is not a cleanup problem, that is a capacity problem, and no amount of cache clearing will fix it.


Rung 7: The reinstall, and the part almost everyone gets wrong

Here is why the hail mary usually fails: uninstalling NinjaTrader 8 does not remove the Documents\NinjaTrader 8 folder. That folder holds your database, workspaces, chart data, cache, templates and NinjaScript. In other words, it holds the problem. Reinstall the program files on top of it and the platform comes right back up with every bit of rot intact, and you have spent two hours proving nothing.

A genuine clean install looks like this.

  1. Back up twice. Run Tools > Export > Backup File… and separately copy the whole Documents\NinjaTrader 8 folder somewhere safe. There is no undo past this point.
  2. Pull out what you cannot regenerate. Your NinjaScript source from the bin\Custom subfolders; the templates folder; the workspaces folder, bad ones included, for reference; and the installers and licence keys for every third-party add-on you paid for. Track those down before you uninstall, not after.
  3. Uninstall NinjaTrader 8 from Windows Settings, Apps.
  4. Rename Documents\NinjaTrader 8 to NinjaTrader 8.old. Rename it, do not delete it. This is the step that makes the reinstall mean anything, and it is your safety net if you forgot to copy something out.
  5. Download a fresh installer from ninjatrader.com. Do not reuse the one sitting in your Downloads folder from two years ago.
  6. Install and launch. NinjaTrader builds a brand-new Documents folder from scratch.
  7. Test the bare platform before restoring anything. Connect your feed, open one chart, and see how it behaves. If a stock install with a single chart is still slow, NinjaTrader was never the problem. Look at the machine, the antivirus, or the data connection.
  8. Restore selectively, one layer at a time. Copy your NinjaScript source back and recompile. Test. Add your templates. Test. Rebuild workspaces by hand. Test. Let historical data re-download naturally as you open charts.

Step eight is the entire point of the exercise, so do not undo it with one click. Tools > Import > Backup File… is the correct tool when you are migrating to a new PC or recovering from a dead drive. It is exactly the wrong tool when you are trying to escape a corrupted install, because it faithfully restores the corruption along with everything else.

Keep the NinjaTrader 8.old folder for at least a month. You will find something you forgot.


Keeping it fast afterwards

  • Add antivirus exclusions for C:\Program Files\NinjaTrader 8 and Documents\NinjaTrader 8. Real-time scanning of folders the platform writes to continuously is a measurable tax, and it is the most common reason a fresh install is still slow.
  • Set the Windows power plan to High Performance. Laptops on Balanced will throttle the CPU in the middle of your session.
  • Restart NinjaTrader daily. Leaving it running for a week is how small leaks become big ones.
  • Tick Replay off by default. Enable it on the one chart that needs it, never everywhere.
  • Keep Days to Load honest. Load what you use.
  • Prefer Calculate On Bar Close wherever the strategy logic allows it.
  • Clear the cache folder monthly as routine maintenance.
  • Keep Windows and .NET current. NinjaTrader 8 runs on the .NET Framework 4.8 runtime.
  • One workspace open at a time.

Quick triage table

SymptomStart at
One chart is slow, the others are fineRung 5, rebuild the chart
Every chart is slow, but a fresh workspace is fastRung 6, rebuild the workspace
Slow startup and a huge db folderRungs 1 and 3
Phantom compile errors, edits not taking effectRung 4, force a recompile
Memory climbs steadily all sessionStrategy or indicator leak, work rung 5
Trace folder measured in gigabytesRung 2, and silence the Print() calls
Bare install, one chart, still slowNot NinjaTrader. Antivirus, machine, or feed
Genuinely nothing above workedRung 7, clean reinstall

The short version

The reinstall is a legitimate tool. It is just the last one out of the bag, and it only accomplishes anything if you rename the Documents folder and restore selectively afterwards. Nine times out of ten the real fix is two rungs further down: a cache purge, one rebuilt chart, or a single indicator that never needed to calculate on every tick.

Back up before every step. Change one thing at a time. Test in between. That discipline is what separates a thirty-minute fix from a lost weekend.

Leave a Reply

Your email address will not be published. Required fields are marked *