Horizon + NinjaTrader
HorizonAI writes NinjaScript, the language of NinjaTrader 8 indicators and strategies. There are two ways to work: build in the Horizon platform and export to NinjaScript at the end (recommended), or set the script type to NinjaScript and talk to it directly. This page gives you the whole picture.
The recommended flow: build in Horizon, export to NinjaScript
This is the main pipeline, and for NinjaTrader it's the one to lean on, because it's where the charts and backtests live:
- Build your strategy by chatting in the Horizon platform. It appears on a live chart with candlesticks as you talk.
- Backtest it right in the chat, with results in seconds. Run multi-market backtests and a stress test to prove the edge is real.
- Export the finished strategy as NinjaScript with one click.
- Run it in NinjaTrader 8: set up the platform (free), paste the code into the NinjaScript Editor, compile, and add it to a chart.
Talking to NinjaScript directly
Already at home in NinjaTrader? Set the script type to NinjaScript in a chat and the AI writes and edits NinjaScript itself, so what you copy is exactly what NinjaTrader compiles:
- Write, read and edit real NinjaScript. Describe an indicator or strategy and get working code, or paste in a script you already have and iterate on it in plain English.
- Convert from other languages. Turn a Pine Script or MQL5 strategy into NinjaScript with the Converter; uploads accept your existing files too.
- Indicator or strategy, your call. Ask for a study that draws on the chart or a system that places trades; NinjaTrader files each in the right place automatically when you compile.
- Test for free in NinjaTrader 8. The platform's charting, simulation and Strategy Analyzer backtests cost nothing.
Good to know
- Charts and backtests happen in NinjaTrader, not in the chat. NinjaScript threads don't have the Chart or Backtest tabs; you compile in the NinjaScript Editor and test in the Strategy Analyzer. If you want to watch and test the strategy while you build it, use the Horizon platform and export at the end.
- Iteration is a short loop: change the code in the chat, click Copy Code, paste into the editor, compile, re-run the Analyzer. Bring anything odd back to the chat and ask the AI about it.
- Multi-market backtests and stress testing live in the Horizon platform; build there and export if you want them.
Getting set up
- Open a chat at app.horizontrading.ai and set the script type to NinjaScript.
- Describe your strategy or paste existing code, and iterate with the AI.
- Install NinjaTrader 8 (free) with a simulation account.
- Click Copy Code, paste into the NinjaScript Editor, compile, and backtest in the Strategy Analyzer.
New to NinjaTrader?
The NinjaTrader tips section in the sidebar covers the platform itself: installing NinjaTrader 8 and getting a free simulation account, using the NinjaScript Editor, and running backtests in the Strategy Analyzer.
Related Guides
- Run NinjaScript on NinjaTrader: from Copy Code to a compiled strategy
- Setting up NinjaTrader 8: install the platform, free simulation account
- Exporting from Horizon: turn a proven Horizon strategy into NinjaScript
- Backtesting in NinjaTrader: the Strategy Analyzer, step by step