> 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.

# Compile Errors

## When compiling a custom indicator or strategy it is possible and likely that you will generate compile errors

* NinjaTrader will compile ALL **NinjaScript** files NOT only the file you are working on.
* A list of compile errors for all files will be displayed in the lower portion of the **NinjaScript Editor**.
* Double click on an error to load the problem file and highlight the problem area.
* Click on the error code to bring up Help Documentation on a specific error.
* Right click on the error to exclude the problem file from compilation (see the section on [Excluding a script from compilation](/developer/desktop-sdk/guides/ninjascript-editor-overview/ninjascript-explorer) for more information).

## The image below illustrates a compile error

1. Section where compile errors are displayed. Errors in the current loaded file are color coded a light color while errors in other files have a darker color code.
2. The file that contains the error.
3. A description of the error.
4. A error code link that will open the Help Guide with any relevant error code information.
5. Line number and column number of the error.
6. Error is underlined with a red wavy line.

The error highlighted by icon (6) below shows that the expression is not closed with a semicolon. The expression should be:

```csharp
double myValue = SMA(20)[0];
```

![NS\_Editor\_4](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/1ee89ccfdc1c3780246f8593d51a37bf341822b600bd95894c90659dc57fe77f/docs/assets/developer/desktop-sdk/guides/compile-errors-ns-editor-4.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=20260729T070252Z&X-Amz-Expires=604800&X-Amz-Signature=6b162c63465ec2a97ca98c3b00c4bca84b33bff707dae3a6b233281bcca55cbc&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)