How to export a non-indicator from NT - futures io
futures io

How to export a non-indicator from NT

Sometimes you need to export something other than an indicator/strategy from NT. For example, a bar type or bar style, which live in the "Type" dir instead of the "Indicator" dir. NT does not directly support this.

The best way that I have found to do this is to place the file in the Indicator directory within NT7, which is also the easiest place to edit/compile/debug it as well. Once you are happy with the code, you export the file as if it was an indicator using the NT Utilities -> Export NinjaScript menu options. The files will be exported into a zip archive, but it is not ready to use yet because it will have a "Indicator" path within the zip file, which is not where you want NT to import it.

In order to fix this, you need to use a zip tool that allows you to edit the zip file (i.e. winzip). Go into the zip archive, and rename the "Indicator" dir to "Type". Save the file, and it is ready to distribute, and NT will happily import the file to the correct Type dir when someone uses the Utilities -> Import NinjaScript option.
Zip utility to edit archives - WinZip

NinjaTrader How-To's

Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada),
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.