Learn NinjaScript — build NinjaTrader 8 indicators from scratch

A free, structured course in native NinjaScript. Start with indicator structure and C# fundamentals, then work up to custom drawing, market-data events, a full moving-average build, and machine-learning models — one lesson at a time.

64 lessons, free Structured curriculum Real projects (BMA + ML)

Most NinjaScript tutorials are scattered forum answers and one-off snippets. This is different: a sequential course that builds real understanding, written by a working developer who ships NinjaTrader 8 tools.

You'll start where every indicator starts — structure, state, and the update loop — then pick up the C# you actually need (collections, classes, error handling), learn to draw and configure on the chart, and finish with two hands-on projects: a Better Moving Average built end to end, and a machine-learning track that goes from k-NN to LSTM networks, all in NinjaScript.

Every lesson is free and stands on its own, but they're ordered to be followed start to finish. Work at your own pace — the whole course stays here.

What you'll be able to do

  • Write an indicator from scratch — structure, state, plots.
  • Use real C# — collections, classes, error handling.
  • Draw & configure — draw objects, parameters, tooltips.
  • Build ML models — from k-NN to neural nets, in NinjaScript.

Foundations

6
01 Understanding the NinjaTrader Indicator Structure Start lesson
02 Variables and Properties Start lesson
03 Mastering OnStateChange() Start lesson
04 OnBarUpdate() Start lesson
05 Calculate Modes: OnEachTick vs OnPriceChange vs OnBarClose Start lesson
06 Historical vs Real-Time (State.Historical, IsFirstTickOfBar) Start lesson

C# Building Blocks

11
07 Booleans, If Statements, and Conditions Start lesson
08 Loops (For, While, Foreach) Start lesson
09 Creating and Using Methods & Functions Start lesson
10 Using Lists, Dictionaries, and Arrays Start lesson
11 Series<T> Start lesson
12 How to Create and Use Custom Enums Start lesson
13 Creating and Using Classes Inside an Indicator Start lesson
14 Try/Catch and Basic Error Handling Start lesson
15 Add-On Your Way to Cleaner Code Start lesson
16 Creating a Utility File for Shared Functions Start lesson
17 Modularizing Reusable Conditions Start lesson

Visuals & Output

7
18 Plots Start lesson
19 Lines Start lesson
20 Brushes Start lesson
21 Drawing on the Chart with Draw Objects Start lesson
22 Adding Alerts, PlaySound, and Rearm Control Start lesson
23 Adding Tooltips and Hover Text Start lesson
24 Plotting Output on Different Panels Start lesson

Parameters & Configuration

4
25 Using [NinjaScriptProperty] Correctly Start lesson
26 Using [Display] to Clean Up the UI Start lesson
27 Organizing Parameters into Groups and Order Start lesson
28 Conditional Parameter Visibility (Workarounds) Start lesson

Market Data & Time

3
29 Working with Market Data Events (OnMarketData) Start lesson
30 Using Time Filters to Limit Logic Start lesson
31 Using Custom Series for Tracking Data Start lesson

Debugging & First Build

2
32 How to Debug Your Indicator Start lesson
33 Building Your First Indicator from Scratch Start lesson

Project: Better Moving Average

4
34 Let’s Make a Better Moving Average (BMA Part 1) Start lesson
35 Planning the Better Moving Average (BMA Part 2) Start lesson
36 File Setup and Core Logic (BMA Part 3) Start lesson
37 Trend Detection with Custom Logic (BMA Part 4) Start lesson

Signal Logic & Pattern Detection

7
38 Detecting Crosses, Flips, and Directional Shifts Start lesson
39 Tracking Highs and Lows Over Time Start lesson
40 Counting Candles Since a Condition Was Met Start lesson
41 Calculating Consecutive Bars Up/Down Start lesson
42 Smoothing Data with Moving Averages Start lesson
43 Creating a Signal Engine with Flags Start lesson
44 Event-Based Logic and the First Touch Start lesson

Advanced Drawing & Rendering

6
45 Plotting Zones, Ranges, and Boxes Start lesson
46 Creating Visual Symbol Markers (Arrows, Icons) Start lesson
47 Drawing Heatmaps and Backgrounds Start lesson
48 OnRender and SharpDX Drawing Start lesson
49 Working with ChartControl and Custom Scaling Start lesson
50 Creating Custom Drawing Tools (Advanced) Start lesson

Advanced: Machine Learning

9
51 ML: k-Nearest Neighbors Indicator Start lesson
52 ML: Online Logistic Regression Start lesson
53 ML: Single-Hidden-Layer Neural Network Start lesson
54 ML: Multi-Hidden-Layer Neural Network Start lesson
55 ML: Adam Optimizer + Mini-Batch Start lesson
56 ML: Recurrent Neural Network Start lesson
57 ML: Long Short-Term Memory (LSTM) Start lesson
58 ML: Random Forest Start lesson
59 ML: Gradient Boosting Start lesson

More Lessons

5
60 Sharing Code Between Indicators and Strategies Start lesson
61 Organizing Your Files and Folders Start lesson
62 Exporting and Importing Custom Indicators Start lesson
63 Adding Button Controls to the Chart Start lesson
64 Saving User Preferences Between Sessions Start lesson

From learning to shipping.

Once you can build an indicator, put it to work. The MyDailyTake tools are the same NinjaScript, taken all the way to production.