Exporting

Convert to NinjaScript

Turn Pine Script or MQL5 into NinjaTrader 8 code

The converter treats NinjaScript as a first-class target, same as Pine and MQL5. Paste a TradingView or MetaTrader script, pick NinjaTrader 8, and HorizonAI rewrites it. Built the strategy in Horizon instead? Don't convert — export from the chat header.

The dedicated converter is a Pro and Elite feature. It runs in every direction: Pine ↔ MQL5 ↔ NinjaScript.

One-click converter

  1. Go to app.horizontrading.ai/convert
  2. Paste your Pine Script or MQL5, drop a file (.cs uploads are accepted too), or load an example. Correct the detected language if needed.
  3. Under Convert to, choose NinjaTrader 8, then convert.
  4. The result opens in a chat. Click Copy Code — NinjaScript has no download button — and paste it into the NinjaScript Editor.

Pick Premium for the highest-quality result, or Basic to spend fewer tokens.

Open Converter →

Horizon strategies are one-way. Export out of Horizon to all three platforms; nothing converts back into Horizon. See Exporting from Horizon.

Convert inside the chat (alternative)

  1. Click New Script and set the platform pill to NinjaScript.
  2. Paste the Pine or MQL5 source.
  3. Type: "Convert this into NinjaScript for NinjaTrader 8."
  4. Click Start building →, then Copy Code.

Say whether you want an indicator (draws on the chart) or a strategy (places trades). NinjaTrader files the compiled result by base class.

After it converts

NinjaScript has no chart or backtest inside HorizonAI. The loop is: copy → paste → compile → test in NinjaTrader.