What is NinjaScript?
What is NinjaTrader
NinjaTrader is a popular and award-winning trading platform that provides advanced tools for charting, market analysis, and trade execution across various financial markets, including futures and forex. It is supported by a large community of traders.
What is NinjaScript
NinjaScript is a powerful programming language, based on C#, that allows traders to extend the functionality of the NinjaTrader platform. It enables you to create custom technical indicators, strategies, drawing tools, and more within the NinjaTrader platform. It offers a rich set of classes and methods specifically tailored for financial market analysis and trading system development.
By developing with NinjaScript, you can:
Customize Your Trading Experience: Tailor the NinjaTrader platform to fit your unique trading style and strategies.
Automate Trading Strategies: Develop automated systems that execute trades based on predefined criteria.
Create Advanced Indicators: Build proprietary indicators to gain deeper insights into market movements.
Enhance Efficiency: Automate repetitive tasks and streamline your trading workflow.
Types of add-ons
With the flexibility of C# at its core, NinjaScript allows you to build various types of add-ons for the NinjaTrader platform, such as custom indicators, automated trading strategies, user interface enhancements, and other tools to customize your trading experience.
Setting up your environment
Installing NinjaTrader
First, you will need to create a free account with NinjaTrader. You can go to their registration page to open a new one: https://account.ninjatrader.com/register

After that, when login into the NinjaTrader dashboard, you will be asked for opening a live trading account. However, don’t worry, you can skip this by clicking the “Additional options” at the bottom to expand a new section.

Click the button “Download” under the sub-section “Download Desktop Platform”.

The button will navigate you to a new page, then, click the button “Download” in the section “Most Recent Release” to download the binary installation file of NinjaTrader.

Your download will start and the file "NinjaTrader.Install.msi" will be available on your computer under the “Downloads” folder (by default). Double clicking the file will open an installation dialog. Just click “Next” and follow the instructions to finish the installation process.

After the installation, you will see a new icon of the NinjaTrader program on your desktop screen. If you don’t see the NinjaTrader icon on your desktop, don’t worry. Just tap the Windows button on your keyboard and search for the term “NinjaTrader”, you will see the program there.
Double clicking the desktop icon or clicking “Open” in the search menu will open a NinjaTrader dialog, enter your credentials and login. Voila, you’re successfully installed the platform.

Note: NinjaTrader desktop program does not have a feature to remember your account password. You will need to type in your password every time you want to use the program. This can be a good exercise for a future project after you've mastered the basics of NinjaScript.
Accessing the NinjaScript Editor
By default, NinjaTrader will open many windows on start. However, you can close all of them, just need to keep this windows open (image below). It’s the Control Center of the program, considering it as the “mother” of all windows.

Please note that, even when you close all child windows, shutdown & re-open NinjaTrader, the closed windows will be opened again. This is because NinjaTrader utilizes the “workspace” method to manage the child windows. It saves the open status of child windows in the default workspace setting and uses that setting when you open NinjaTrader the next day.
To make NinjaTrader remember our decisions, you can create a new workspace and save your own settings. From the Control Center top toolbar, click “Workspaces” => “new”

Then give your new workspace a name and click OK.

Go back to the Workspaces menu, you will see your new workspace here. Just click “save” and your child windows status is saved.

Now we come back, NinjaTrader have a built-in development environment call NinjaScript Editor for developing add-ons within a NinjaTrader workspace. You can go to the Control Center top toolbar, select “New” => “NinjaScript Editor” to open the editor

Tour of the NinjaScript Editor
The NinjaScript Editor is now open. There are a few things you need to know about the interface of this editor:
NinjaScript Explorer (#1) - Displays files and folders for your NinjaScript add-ons. These files are stored in the “DOCUMENTS\NinjaTrader 8\bin\Custom” folder.
Toolbar (#2) - Moving your mouse over each icon will display the function of the icon button
Line numbers (#3)
Line modification marking (#4) - Yellow flags indicate unsaved line modifications where green flags indicate saved modifications
Tabs (#5) for creating new scripts via the NinjaScript wizard and working on multiple scripts at once.

You can right click the blank space to open a context menu. This menu has nothing to do right now. We can come back to it when digging deeper.

Go back to the Control Center and save your workspace (Workspaces => hover to your workspace => save)
Next
Great job! You've successfully set up your NinjaScript development environment.
In the next article, we'll explore the basics of C# programming, which is essential for NinjaScript. If you encounter any issues, please don't hesitate to leave a comment. We're excited to help you begin your journey into developing powerful NinjaTrader tools.
Appendix
NinjaScript for Beginner