Learn NinjaScript: Saving User Preferences Between Sessions
How to persist NinjaScript indicator state between sessions. Writing JSON to NT user-app-data, when to save, and the pitfalls of disk I/O in an indicator.
NinjaScript tutorials from someone who’s been writing it since NT6.5. Start at the top if you’re new — or jump to whatever you’re stuck on.

How to persist NinjaScript indicator state between sessions. Writing JSON to NT user-app-data, when to save, and the pitfalls of disk I/O in an indicator.

How to add a WPF button to a NinjaTrader chart from NinjaScript. Dispatcher marshaling for thread safety, click handlers, and cleanup on state teardown.

How NinjaScript archives work, and how to build them manually for automated release workflows. Info.xml format, folder structure, dependencies, and pre-release cleanup.

How to organize NinjaScript files and folders for a codebase you can navigate six months in. Sub-folder conventions, namespace alignment, naming patterns, and the compile-fail traps to avoid.

Two ways to share code between NinjaScript indicators and strategies — AddOn helpers vs instantiated indicators. When each fits, the compilation-order pitfalls, and a RiskUtils anchor used from both.

How to pull repeated logic out of a giant OnBarUpdate if-statement and into named bool methods. Signatures, placement, composition patterns, and when extraction goes too far.

How to set up a shared utility file in NinjaScript so you stop copy-pasting helpers across indicators. AddOn folder, static class pattern, and the compilation-order pitfalls to avoid.

An orientation to building custom drawing tools in NinjaScript. DrawingTool class, anchor system, mouse handlers, and rendering — the minimum viable shape of a user-placed chart tool.

How to read ChartControl and ChartScale in NinjaScript for custom overlays. Canvas dimensions, visible bar range, pixel-to-value conversion, and patterns for zoom-responsive rendering.

When to leave Draw.* behind and take over the chart canvas with OnRender and SharpDX — render gating, RenderTarget lifecycle, coordinate conversion, and a SMA value-label anchor.
The Account Copier mirrors one leader account to every follower in lockstep, on the same machine, across your LAN, or through the cloud relay. Free on one account.
Notifications