> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Export Problems

If you are having difficulties exporting **NinjaScript** it could be due to one of the following reasons:

If you receive the above error, you will need to compile your **NinjaScript** error-free before you can export. To see if your **NinjaScript** file is error free, open the **NinjaScript Editor** (Tool > Edit **NinjaScript**) and press F5 to compile. If you are trying to check a **NinjaScript Strategy** created from the **Strategy Wizard** you can do the same by finishing the wizard and seeing if you receive the “Strategy successfully generated” message.

If you receive any errors when compiling you will need to address them before exporting.

![Export\_Problems\_1](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/0f4bc0146e16069b760d84d5c4149ce3c2e1a31eef3fa9fd83d1081c7d5746cb/docs/assets/developer/desktop-sdk/guides/export-problems-export-problems-1.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260729%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260729T070259Z&X-Amz-Expires=604800&X-Amz-Signature=48e08c8bc13837db46352463f5d9964857e422c9ffe3de9eb340ac2c60aec7fe&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

If you are able to compile without errors and still experience exporting difficulties like the one above, check to see if you receive an error similar to this in the Control Center logs:

> "3/6/2014 9:25:30 AM|2|4|Error compiling export assembly: C:\Users\NinjaTrader\Documents\NinjaTrader 8\bin\Custom\Indicator\MyCustomIndicator.cs(42,18) : error CS0118: **NinjaTrader.Indicator.SMA** is a type but is used like a variable"

This error may have a different error code and message depending on which variant of .NET you have installed. An error message indicative of this issue would include an indicator name without quotation marks.

If you experience this error, please follow this procedure:

1. Take note of which indicator is referenced by the error. In the above example, it is the **SMA**
2. Go to your **NinjaScript Export** utility. (Tools > Export > **NinjaScript**...)
3. After press "add" select “System indicators” from the "Type" drop down
4. Add the indicator that was referenced in the error to the export list along with your custom **NinjaScript** by pressing the > button
5. Press the “Export” button to create your **NinjaScript Archive File**. If you receive the same error again, repeat this procedure until you add all the referenced system indicators and are able to successfully export your custom **NinjaScript**.

If the indicator referenced in the error is another custom indicator you will need to follow the same procedure to add the custom indicator.