Indicators

Pine Script to NinjaTrader: How to Use Your TradingView Indicators With NinjaTrader Data

· 5 min read

Many traders learn and build their indicators on TradingView but execute through NinjaTrader because that is where their prop firm account lives. Converting a Pine Script indicator to NinjaScript is not trivial. Here are the options.

Pine Script and NinjaScript are not compatible

Pine Script is TradingView's language: short, built for time series and easy to read. NinjaScript is C# inside NinjaTrader: very powerful, but much longer and with its own way of handling bars. A 40-line Pine indicator can become several hundred lines of NinjaScript.

Ways to use your indicators with NinjaTrader data

How to do it in TQ Charts

  1. Copy your indicator's code from TradingView's Pine editor.
  2. In TQ Charts open the fx button (indicators) and choose to paste a Pine script.
  3. Paste the code. The script's inputs and styles show up in its settings, just like on TradingView.
  4. Turn it on with the switch and configure it from the chart legend (the ▾ arrow under the symbol).

This feature is on the Pro and Elite plans. Most Pine functions are supported.

You can only paste scripts whose source code you have. Protected or invite-only TradingView indicators don't expose their code and can't be copied.

Tips

Keep reading