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

# NinjaScript Editor Components

## Overview

The **NinjaScript Editor** is a powerful scripting editor that allows you to create custom indicators, strategies, and any other custom **NinjaScript** types used to enhance the **NinjaTrader** platform. The **NinjaScript Editor** can be opened by selecting the New menu from the **NinjaTrader Control Center**. Then left mouse click on the menu item **NinjaScript Editor**.

* **NinjaScript Explorer** - Displays files, folders, and allows for additional file management
* **Tool bar** - Moving your mouse over each icon will display the function of the icon button
* **Line numbers**
* **Line modification marking** - Yellow flags indicate unsaved line modifications where green flags indicate saved modifications
* **Tabs** for creating new scripts via the [NinjaScript wizard](/developer/desktop-sdk/guides/ninjascript-editor-overview/ninjascript-wizard) and working on multiple scripts.

![NS\_Editor\_1](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/1389de4374db0e13044726a5497e46c238bc389a23778580ae4385aa5e1d2efb/docs/assets/developer/desktop-sdk/guides/ninjascript-editor-components-ns-editor-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=20260729T070450Z&X-Amz-Expires=604800&X-Amz-Signature=6709ba7f74edd008dc598c1a896607e93391cf744a2ee1353150d77074113ccf&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## Context Menus

Context menus can be opened by right-clicking in the **NinjaScript Editor**.

![NinjaScriptEditorContextMenu](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/9272dad93dccce0de3ea4a2a2399810ea9dafeaf123b349163c545daf9f3cfbd/docs/assets/developer/desktop-sdk/guides/ninjascript-editor-components-ninjascripteditorcontextmenu.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=20260729T070450Z&X-Amz-Expires=604800&X-Amz-Signature=8bfaf365f9d3a2a98a628295a83de47b3866d8e1e161e07a0f96175756e5179d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

* Context Menu Items
*

| Name                | Description                                                                                                                                                                                    |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Save                | Saves pending changes to the currently open NinjaScript                                                                                                                                        |
| Save As             | Creates a copy of the script and attempts to rename the class name so the new script is unique                                                                                                 |
| Insert Code Snippet | Inserts a code snippet (see [Code Snippets](/developer/desktop-sdk/guides/ninjascript-editor-overview/code-snippets) for more information)                                                     |
| Go To Line...       | Moves the cursor to the line of code specified.                                                                                                                                                |
| Undo                | Undoes the last modification                                                                                                                                                                   |
| Redo                | Applies the modification that was last Undone                                                                                                                                                  |
| Cut                 | Removes selected text and copies to clipboard                                                                                                                                                  |
| Copy                | Copies selected text to clipboard                                                                                                                                                              |
| Paste               | Pastes the text saved in the clipboard                                                                                                                                                         |
| Remove              | Removes the selected text                                                                                                                                                                      |
| Select All          | Selects all text in the Code Editor                                                                                                                                                            |
| Debug Mode          | Sets if a debug dll should be generated on compilation (see [Visual Studio Debugging](/developer/desktop-sdk/guides/ninjascript-editor-overview/visual-studio-debugging) for more information) |
| References...       | Opens the list of dll references used by **NinjaTrader**. This includes dll's used by **NinjaTrader** and dll's installed with custom Add On's.                                                |
| Show Warnings       | Enables Warning messages to be seen alongside compile errors                                                                                                                                   |
| Always On Top       | Sets the **NinjaScript Editor** to viewed on top of other windows                                                                                                                              |
| Print               | Allows printing the content of this window (see [Printing Content](/developer/desktop-sdk/references/common/alert-debug-share/print) for more information)                                     |
| Share               | Allows sharing the content of this window (see [Sharing Content](/developer/desktop-sdk/references/common/alert-debug-share/share) for more information)                                       |
| Properties          | Opens the Properties menu (see below)                                                                                                                                                          |

## Properties and Definitions

![ninjatrader\_2020-12-03\_10-03-00.png](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/df8c28748e11c574385b5d91c483d500dfcf17562dc33ecc00138e5ed4f96daf/docs/assets/developer/desktop-sdk/guides/ninjascript-editor-components-ninjatrader-2020-12-03-10-03-00.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=20260729T070450Z&X-Amz-Expires=604800&X-Amz-Signature=d0b953b6ee491420a07172b2fa663a36eb3b7ae75f3db23c137ee3b10441c4c8&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

* General
*

***

* Auto hide NinjaScript explorer
* Sets if the NinjaScript explorer should be collapsed by default

***

* Debug mode
* Sets if a debug dll should be generated on compilation (see [Visual Studio Debugging](/developer/desktop-sdk/guides/ninjascript-editor-overview/visual-studio-debugging) for more information)

***

* Inline syntax checking
* Sets if errors and warnings should be detected as code is written (without needing to compile)

***

* Auto bracket completion
* Sets if opening characters should automatically be appended closing characters. Works for (parentheses), \[brackets], \{braces}, \<angled brackets>

***

* Show indentation lines
* Displays vertical lines for code formatting

***

* Show Warnings
* Sets if code warnings should be shown on compilation.

| Font | Sets the font options | Window |
| ---- | --------------------- | ------ |

*

| Property      | Description                                                |
| ------------- | ---------------------------------------------------------- |
| Always on top | Sets if the window will be always on top of other windows. |