This article outlines common NinjaScript compile errors that may appear when importing a third-party add-on, removing a NinjaScript assembly, using the Strategy Builder, or updating the NinjaTrader Desktop app.
To optimize runtime performance, NinjaTrader Desktop compiles all indicators and strategies simultaneously, rather than compiling them individually.
Compile errors most often appear when a third-party add-on is missing a reference to its location, there is an old reference specifying an out-of-date file location, or there are duplicate files with duplicate definitions.
Examples of these error messages include:
"You have custom NinjaScript files on your PC that have programming errors. These errors must be resolved before you can import a NinjaScript Archive File."
"Remove failed. You have custom NinjaScript files on your PC that have programming errors. These errors must be resolved before removing a NinjaScript assembly."
"NinjaTrader must be in a compilable state to create or edit strategies. Please use the NinjaScript editor to resolve compilation errors."
"Files are in a non-compilable state and will be excluded from this backup." - This will appear while attempting to export a backup file that includes NinjaScript items.