Scripts

Create, edit, compile, apply.

Three questions that end with a script of your own in NinjaTrader. Your assistant writes the code, the bridge places it, NinjaTrader compiles it, and the result goes on any chart that carries the permission indicator. The file is yours, under the name you gave it, with a working copy in DEV\cs and a recovery copy in DEV\backup when one is taken out.

The replies are the assistant’s exact words, the pictures stills, from the recorded run of September 24, 2026. Watch the recording.

Any workspace: the prompts say "my NQ chart", the chart these were run on. Say any chart of yours that carries the permission indicator.

Permission: Scripts on the menu (Help > High Tech Trading Analysis > AI Bridge > Scripts) to write, place and compile. Taking a script back out, or placing one over a file that already exists, needs the Destructive tick as well; both must be on, and it asks you in the chat first unless --- Unattended is ticked too. Putting the result on a chart of your own needs the __HTAIBridge indicator on that chart. The NinjaScript editor can be open or closed; with it closed the bridge runs NinjaTrader's own compiler itself.
1Ask this
Write me an indicator called MyRange that plots each bar's range in ticks as a line in its own panel, then put it on my NQ chart and read me the last three values.

"Write me an indicator that plots each bar's range in ticks, in its own panel, and put it on this chart."

A new indicator in NinjaTrader's list, named what you called it, already on the chart in a panel below the price. No editor, no copying files, no F5.

Click for what came back
The assistant replied

MyRange is written, checked by the Bridge, placed in Indicators, and compiled by the editor at 13:48. It is on the NQ chart in its own panel. The last three closed bars: 117, 319 and 112 ticks. The forming bar has no value yet.

NQ 12-26 with the new MyRange indicator in its own panel
2Ask this
Change MyRange so the line is the average range of the last five bars instead of one, rebuild it, and reload my NQ chart so I see the new version.

"Make that a five-bar average, and reload my chart."

The same file rewritten, rebuilt and back on the chart, with the previous copy kept in a separate revision folder under DEV/backup in case you want it back. The bridge returns its exact backup path.

Click for what came back
The assistant replied

MyRange is rewritten as a five-bar average, placed with the previous version backed up, compiled at 13:50, and the NQ chart reloaded. The last three closed bars now read 173.4, 164 and 152.8 ticks.

NQ 12-26 with MyRange rebuilt as a five-bar average
Note

The same panel after the rebuild and reload: the five-bar average, smoother than the single-bar line.

3Ask this
Open MyRange in the NinjaScript editor so I can read it. Then take it out of NinjaTrader; I am done with it.

"Show me the code, then take MyRange back out."

The file opened in your NinjaScript editor, brought to the front; then the script removed from NinjaTrader again, with a copy kept, and NinjaTrader rebuilt without it.

Click for what came back
The assistant replied

MyRange was opened in the editor for reading, the editor was closed, the indicator came off the NQ chart, and the file was removed from NinjaTrader with its last version kept in the backup folder. NinjaTrader rebuilt clean in six seconds.

More you can ask (These are just examples. There is no menu to learn.)

  • "Write me a strategy that buys a close above the daily VWAP and sells a close below."
  • "Add a sound alert when the range is over 60 ticks."
  • "Make it a Market Analyzer column."
  • "Does my script folder compile?"
  • "Compile." (F5 from the chat)
  • "Open the NinjaScript editor." / "Close it."
  • "Show me the code."
  • "Put the old version back." (from DEV\backup)
  • "What scripts have you placed this session?"
  • "Backtest it." (the Backtests page)