Guide · Troubleshooting

Strategy not showing in NinjaTrader: every cause and fix

You imported or wrote a strategy, and it isn't in the list. Here is every common reason, in the order worth checking, with the exact place to look in NinjaTrader for each one.

Strategy not showing in NinjaTrader: every cause and fix: cover illustration

Short answer. A strategy that won't appear in NinjaTrader is almost always one of four things: a compile error in any NinjaScript file, a script that was saved but never compiled, a file outside the folder NinjaTrader reads (often because OneDrive moved Documents), or a vendor license that isn't active yet. Open the NinjaScript Editor, press F5 and read the errors at the bottom first.

What "not showing" looks like

A missing strategy can mean slightly different things depending on where you're looking, and the place it's missing from is the first clue.

Where a strategy can be missing, and what it usually means
Where it's missingWhat you seeMost likely cause
Chart Strategies windowRight-click a chart, choose Strategies, and the name isn't in the Available listNot compiled, compile error elsewhere, or the file isn't in the Strategies folder
Control Center Strategies tabA strategy you had running is gone after a restartThe platform started while a compile error existed, so the strategy couldn't load
Strategy AnalyzerThe strategy isn't in the list for a backtestSame as the chart list: compile first
NinjaScript EditorThe file isn't in the Strategies folder in the editor's explorerThe import went to a different Documents folder, or the import failed
Listed but can't be enabledThe strategy is in the list but won't start, or its Enabled box clears itselfAn error when the strategy starts, a license problem, or no connection

Work through the fixes below in order. The first two solve most cases, and every later step assumes the first one is done.

Fix 1: a compile error in any script blocks everything

NinjaTrader compiles every NinjaScript file in your Documents folder into one assembly. If a single file anywhere has an error, the compile fails and nothing new or changed can load. That includes indicators and add-ons that have nothing to do with the strategy you're looking for. It's why a strategy can disappear after you import something completely unrelated.

  1. In the Control Center, open New, then NinjaScript Editor.
  2. Open any script (double-click one in the explorer on the right), then right-click in the code window and choose Compile, or press F5.
  3. Read the error list at the bottom of the editor. Each line names the file, the line number and the error. Drag the bottom panel up if the list is long.
  4. Look at the file name column, not just the message. The error is very often in a different file from the strategy you're trying to use.
  5. Fix or remove the file that's causing it. If it came from a third party and you don't need it, the cleanest fix is to remove it properly (see Fix 6).
  6. Compile again until the list is empty. Then reopen the chart's Strategies window, since a window that was open during the compile may still show the old list.

Why strategies vanish from the Strategies tab. NinjaTrader's support team explains that if you restart while a compile error exists, strategies on the Control Center's Strategies tab are unloaded because their code couldn't load at startup. Fixing the error doesn't bring those configured instances back by itself; you add them again. A backup made with the platform's backup tool before the error lets you restore the earlier setup.

Two error types show up again and again after imports. "The type or namespace name could not be found" usually means a script depends on another file or DLL that isn't installed. "already contains a definition for" means two files define the same thing, often because the same product was imported twice under different file names.

Fix 2: the script was saved but never compiled

Saving a file in the NinjaScript Editor doesn't add it to the lists. Only a successful compile does. NinjaTrader's support forum has a common version of this: someone uses Save As to copy an existing strategy, sees the new file in the editor, but never compiles it, so the copy never appears on a chart. Make a small edit, press F5 and check the error list is clean.

If you built the strategy in the Strategy Builder, finishing the wizard compiles it for you, but only if the rest of your scripts compile too. A builder strategy that "didn't save" is very often Fix 1 in disguise.

Fix 3: the name you're looking for isn't the name in the list

The name in the Strategies list comes from the Name property the code sets in OnStateChange() during State.SetDefaults. It doesn't come from the file name, and it doesn't have to match the class name. So a file called MyGoldBot.cs can appear as something else entirely.

  • Expand the folder groups. The Available list in the chart Strategies window is grouped by folder. Strategies inside sub-folders sit under that folder's name.
  • Check the code. Open the file in the editor and find the line that sets Name =. That string is what you're looking for.
  • Two strategies with the same Name are confusing in the list and in saved templates. Give each one a distinct name.
  • Only public, non-abstract strategy classes appear. A class has to derive from Strategy in the NinjaTrader.NinjaScript.Strategies namespace. A base class written to be inherited, or one marked abstract, compiles fine and never shows up on its own.

Vendor strategies normally keep a stable, recognizable name, so if you bought or downloaded one, the documentation tells you exactly what to look for.

Fix 4: the file is in the wrong folder or excluded from the compile

NinjaTrader only reads strategy source files from the bin\Custom\Strategies folder inside the NinjaTrader folder in your Documents (the folder name carries the platform's version number). A .cs file dropped anywhere else, such as your Downloads folder or the root of the Custom folder, isn't treated as a strategy.

  1. Use Tools, then Import, then NinjaScript Add-On for vendor files. Don't unzip an export and copy files by hand: an export is a .zip archive built for the importer, and its contents often need the import step to land in the right places.
  2. If you're working with loose .cs files, put them in the Strategies folder above, then compile.
  3. In the NinjaScript Editor's explorer, right-click the file. If the menu offers to include it in compilation, the file is currently excluded and won't build. Excluded files are shown greyed out.

Our step-by-step guide to importing an automated strategy covers the importer, the confirmation messages and the common import errors in detail.

Fix 5: OneDrive moved your Documents folder

NinjaTrader keeps all user data, including every script, in a NinjaTrader folder inside Documents. On many Windows PCs, OneDrive backs up Documents, which moves it to a OneDrive path. NinjaTrader's support article on this says that in rare cases the folder fails to sync properly and blocks NinjaScript imports, with errors such as "Access to the path ... is denied" or "Could not find part of the path" pointing at a OneDrive location.

The fix NinjaTrader publishes, in short:

  1. Close NinjaTrader.
  2. In OneDrive's settings, under Sync and backup, choose Manage backup and turn off backup for Documents.
  3. Copy the whole NinjaTrader folder from the OneDrive location into the Documents folder on your local drive.
  4. Reinstall the NinjaTrader desktop app. NinjaTrader states this doesn't remove your custom data or settings.

NinjaTrader's own article says not to go through these steps unless you're seeing those exact errors, so check the error text first. A second, quieter version of this problem: two Documents folders exist, and the import landed in one while the platform reads the other. The path shown in an import or compile error tells you which one is in use.

Fix 6: errors when the strategy starts

Some strategies compile, appear in the list and then refuse to run. The Log tab of the Control Center shows why. Look for a line that names the strategy with a message like "Error on calling 'OnStateChange' method" or "Error on calling 'OnBarUpdate' method", followed by the technical reason.

  • Index or "bars ago" errors usually mean the strategy asked for more history than the chart has loaded. Load more days of data on the chart or in the strategy's data series settings.
  • "Object reference not set" is a code problem, often a missing indicator or data series. If it's a vendor product, send the vendor the exact Log line.
  • A strategy that disables itself right after you tick Enabled has usually hit an error like these, or a setting it checks on start. The Log tab tells you which.

If an imported product left broken files behind, NinjaTrader has a removal tool: Tools, then Remove NinjaScript Assembly removes compiled assemblies that came from an import. Source files can be removed from the NinjaScript Editor's explorer. Remove only what you're sure about, and make a backup first with the platform's backup option under Tools, Export.

Fix 7: it broke after a platform update

An update installs a new version of the platform over the old one, and your Documents folder stays where it is. Most scripts keep working. The ones that don't are usually compiled third-party files built against an older version, or scripts that use something the update changed.

  1. Compile in the NinjaScript Editor and read the errors (Fix 1). An update often turns an old, unmaintained add-on into the one file that blocks everything.
  2. Get the current version of each third-party product from its developer and import it again.
  3. Check you have only one copy of the platform installed. NinjaTrader's support team warns that installing a second copy to a different folder, instead of over the existing one, can leave old files behind and cause conflicts. If that happened, uninstall, confirm the old program folder is gone, and install once.

Fix 8: a vendor license that isn't active yet

Commercial strategies are usually protected with NinjaTrader's vendor licensing, which ties the product to your NinjaTrader account. A protected strategy can import without errors and still refuse to run until the vendor has activated your license. The Log tab or a pop-up message tells you when that's the problem.

  • Make sure you sent the vendor the exact username you use to sign in to NinjaTrader.
  • Restart the platform after the vendor confirms the license is active.
  • Check that the license covers the product version you imported; an old file from an earlier download may not match.

FuturesBotLab licensing uses your email and NinjaTrader account. Review payment confirmation, protected downloads and manual license activation status in your account before running a bot.

Fix 9: it's in the list but greyed out or won't enable

A strategy needs a connection, an account and data before it can do anything. If the list or the Enabled box isn't behaving, check these in order:

  • Connection. The Account drop-down only lists accounts for connections that are connected. Connect first (Connections menu in the Control Center), then open the strategy settings again.
  • Instrument and contract month. A chart on an expired contract month or an instrument without data gives the strategy nothing to calculate.
  • Already running elsewhere. Check the Strategies tab for another instance with the same settings on the same account and instrument.
  • It's enabled, just waiting. A strategy shown in yellow on the Strategies tab is running and waiting until its calculated position is flat before it sends real orders. That's start behavior, not a fault; see strategy start behavior explained.

When to contact the vendor and when to contact NinjaTrader

Who to contact for each kind of problem
ProblemContactWhat to send
Compile errors in a vendor's filesThe vendorA screenshot of the error list with file names visible
Compile errors in files you don't recognizeNinjaTrader supportThe error list and what you imported recently
License or "not licensed" messagesThe vendorYour NinjaTrader username and the exact message
Import errors with a OneDrive pathNinjaTrader supportThe full error text
A strategy that runs but behaves unexpectedlyThe vendorThe Log tab lines, the strategy settings and the chart setup

Both will ask for the same evidence, so collect it before you write: the error list from the NinjaScript Editor, the relevant lines from the Log tab, and your platform version (Help, then About).

A quick checklist

  1. Compile with F5. Is the error list empty?
  2. Is the file in the Strategies folder under bin\Custom, and included in the compile?
  3. Are you searching for the Name the code sets, inside the right folder group?
  4. Is your Documents folder on OneDrive, and does an error mention that path?
  5. Does the Log tab show an error when you enable the strategy?
  6. Is the license active for your NinjaTrader username?
  7. Are you connected, on the right account and contract month?

Once the strategy shows up, test it on a simulated account before anything else. Our bot risk settings guide covers what to check before you enable any bot, and the tick value calculator shows what each stop size is worth per contract.

Free tools: tick value calculator · position size calculator · futures market hours · daily loss limit calculator.

Related guides

Bots mentioned in this guide

Futures trading involves substantial risk of loss and is not suitable for every investor. Past or hypothetical results don't guarantee future results. This guide is educational, not investment advice. Risk disclosure.

FAQ

Common questions

Why is my strategy not showing up in NinjaTrader?

Usually because NinjaTrader couldn't compile your scripts. One error in any NinjaScript file stops new or changed strategies from loading. Open the NinjaScript Editor, press F5 and fix the errors listed at the bottom.

My strategy compiled but isn't in the list. Why?

Look for the name set in the code's Name property, not the file name, and expand the folder groups in the Available list. Also reopen the Strategies window, since one that was open during the compile can show the old list.

Why did my strategies disappear from the Strategies tab?

If NinjaTrader starts while a compile error exists, strategies on the Control Center's Strategies tab are unloaded because their code can't load. Fix the error, then add the strategies again or restore a backup made before the error.

Where does NinjaTrader store strategy files?

In the bin\Custom\Strategies folder inside the NinjaTrader folder in your Documents. Imports through Tools, Import, NinjaScript Add-On put them there for you.

Can OneDrive stop a NinjaTrader import?

In rare cases, yes. NinjaTrader's support article describes access-denied or path errors when the Documents folder doesn't sync properly. The fix is to stop OneDrive backing up Documents, copy the NinjaTrader folder locally and reinstall.

Why can't I enable a strategy that's in the list?

Check the Log tab for an error, confirm you're connected and on the right account, and check the vendor license is active. A strategy shown in yellow is already enabled and waiting until flat.

Membership details

Let the bot follow the rules, so you don't have to.

Every bot, every update, one membership.