New site — tools are being added and improved regularly. Spotted an error or have a suggestion? Let us know.

← back to tools

NinjaScript code reviewer

Paste a NinjaScript indicator or strategy and get feedback on structure, common pitfalls, and performance issues before you compile.

Paste a NinjaTrader 8 indicator or strategy, or drop in a .cs file or a NinjaTrader export .zip, and this tool checks it against about thirty common NinjaScript pitfalls: work done in the wrong State, missing bar checks, objects and drawings created on every bar, resources that are never cleaned up, and patterns that are a common cause of high CPU or growing memory. Each finding comes with its line number, a plain-English explanation and a short fix.

It catches common patterns, not logic errors. It doesn't compile or run your code, can't tell whether your entries make sense, and a flagged pattern isn't always a problem in context. Your code and files stay in your browser: nothing is uploaded.

Drop a .cs file or a NinjaTrader export .zip hereor

Files are opened in your browser, not uploaded. Up to 5 MB. In NinjaTrader, exports come from Tools → Export → NinjaScript Add-On.

Your code stays in this browser tab. It isn't uploaded, stored or sent anywhere; the checks run on your own device.

If you suspect a problem

A pattern match tells you where to look, not whether a script is actually slowing NinjaTrader down. To measure that, use NinjaTrader's own tools:

  1. In the Control Center, choose New → NinjaScript Output. Right-click inside the Output window and choose NinjaScript Utilization Monitor.
  2. The monitor lists each running script with its total processing time in milliseconds. The figures are cumulative, so a large number on its own means little. What matters is one script sitting well ahead of the rest and climbing quickly while the others stay flat.
  3. For NinjaTrader's overall CPU and memory, open Windows Task Manager (Ctrl+Shift+Esc) and watch NinjaTrader over a session. Memory that keeps rising and never settles, or CPU that jumps whenever a particular chart updates, points to the script to look at first.

A useful test is to remove the suspect script, restart NinjaTrader, and compare the same session with and without it.