Horizon + NinjaTrader

Install your export in NinjaTrader

Copy the code or folder, compile it, then start in Sim101

A single-strategy export gives you one NinjaScript strategy. A portfolio export gives you a ZIP containing a complete folder with one controller and its support modules. The installation is different, so follow the section that matches what you exported.

Use Sim101 first. Enabling the same strategy or controller on a live account can place live orders.

Before you begin

Install NinjaTrader 8 and make sure you can open its Control Center. See Setting up NinjaTrader 8.

Install one strategy

If HorizonAI downloaded a .cs file:

  1. Close NinjaTrader or make sure the strategy is not running.
  2. Copy the .cs file into Documents\NinjaTrader 8\bin\Custom\Strategies.
  3. In NinjaTrader, open New → NinjaScript Editor and press F5 to compile.
  4. Open a chart for the strategy's market and timeframe.
  5. Right-click the chart, choose Strategies, add the exported strategy and select Sim101.
  6. Check its quantity and inputs, then enable it.

If no file downloaded, click Copy Code in the exported NinjaScript chat and follow Using the NinjaScript Editor to create a matching strategy file, paste the code and compile it.

Install a portfolio

  1. Extract the portfolio ZIP. Do not separate the files inside it.
  2. Copy the entire exported folder into Documents\NinjaTrader 8\bin\Custom\Strategies.
  3. Open New → NinjaScript Editor and press F5 to compile everything.
  4. Open New → Strategies and add only the strategy ending in Controller.
  5. Under Data Series → Instrument, select any valid instrument that your connected data feed supports. Do not leave it blank or showing "Select" — NinjaTrader requires an instrument to add the controller. If a valid instrument is already selected, you can keep it.
  6. Leave the other Data Series settings at their defaults. This selection only hosts the controller; it does not choose the portfolio's trading markets or timeframes. The controller automatically loads the portfolio's configured data series and uses its built-in quantities. Your data connection must still provide data for those markets.
  7. Select Sim101, then enable the controller.

Do not enable the individual strategy files. They are support modules used by the controller. Start, stop, replace or update the controller only while the account is flat.

The ZIP includes README.txt with the portfolio's exact strategy list and installation steps. At futures rollover, wait until the account is flat, disable the controller, export the portfolio again and replace the old folder so its contracts are current.

Check that it is running

Open New → NinjaScript Output:

  • HORIZON ACCEPT means a signal passed the safety checks and an order was submitted.
  • HORIZON REJECT means an entry was safely skipped; the message explains why.
  • HORIZON EXIT or HORIZON FILL records managed exits and fills.

Troubleshooting

  • Compile error: open the error row in NinjaScript Editor. For a single script, copy it into its HorizonAI chat. For a portfolio, re-export the complete package instead of editing support modules separately.
  • Strategy is missing: compile with F5 again and confirm the file or portfolio folder is under bin\Custom\Strategies.
  • "Please select an instrument for strategy": the Data Series → Instrument field is blank or still showing Select. Choose a valid instrument supported by your connected data feed, then try again. For a portfolio controller, this host instrument does not replace the portfolio's configured markets.
  • Nothing happens: confirm the strategy is enabled, Sim101 is selected and the required market data is available.