NinjaScript maintenance

3 min read

Export NinjaScript: source files, assemblies and dependencies

Choose the export format for the recipient, include required scripts and handle external DLLs separately.

Conceptual illustration of editable code sheets and a solid compiled module, each pointing into a separate ZIP package.

Quick answer

Choose source export when the recipient needs to edit your NinjaScript. Choose a compiled assembly when distributing a DLL instead of editable source. Both export options create a NinjaScript ZIP archive.

Choose the format for the recipient

A ZIP extension alone does not tell the recipient which format you selected. State that in your handoff.

Recipient needsExport choice
Read or change the scriptSource files
Use the compiled indicator or strategyCompiled assembly

Create the NinjaScript archive

In the Control Center, open Tools > Export > NinjaScript. For a DLL, select Export as compiled assembly. Use Add and the Type filter to select scripts, review the export list, then choose Export and a ZIP destination.

The default destination is Documents > NinjaTrader 8 > bin > Custom > ExportNinjaScript. Compiled exports also offer Product and Version fields.

Include the scripts the export needs

If NinjaTrader reports compilation errors, fix them before exporting. A successful normal compile can still be followed by an export-specific reference error: read the Control Center log for the indicator named in that error.

NinjaTrader’s export troubleshooting instructions describe adding that referenced indicator to the export list. Use System indicators in the Type filter for a built-in indicator; include a referenced custom indicator too. This addresses a missing export dependency, rather than treating every export failure as a broken installation.

External DLL dependencies need a different distribution plan. NinjaTrader advises a custom installer for scripts that reference external DLLs; do not assume selecting your main script packages every external requirement.

A compiled DLL is not a guarantee against reverse engineering

Compilation changes the distribution format, but .NET assemblies can still be subject to decompilation. NinjaTrader documents an optional Protect compiled assembly setting using a separately licensed Agile.NET product.

Treat protection as an additional step with its own setup requirements. Do not describe an ordinary compiled export as impossible to inspect or reverse engineer.

Import the package; use Backup for the workstation

On the receiving installation, use Tools > Import > NinjaScript and select the trusted ZIP archive. NinjaTrader’s import documentation specifically cautions against importing archives from untrusted sources.

For a machine transfer or recovery copy, use the separate Backup & Restore utility to select the user data you need. Its scope can include preferences, custom scripts and historical data. A script distribution package does not establish that your workstation configuration has been preserved.

Official sources

Platform monitoring

Monitor the platform after setup

Ninja Watchdog monitors NinjaTrader and supports recovery after platform interruptions. Email alerts are available today; SMS and WhatsApp alerts are coming soon.

Explore the free trial