Pine Script to NinjaTrader: How to Use Your TradingView Indicators With NinjaTrader Data
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
- Rewrite it in NinjaScript. The native option, but you need to know C# or pay a developer, and every change means converting again.
- Stay on TradingView with a second data package. You keep your scripts, but you pay for CME data again (we explain it in this article).
- Use a charting app that understands Pine Script and reads your NinjaTrader. Paste the script as is and see it on your account's data.
How to do it in TQ Charts
- Copy your indicator's code from TradingView's Pine editor.
- In TQ Charts open the fx button (indicators) and choose to paste a Pine script.
- Paste the code. The script's inputs and styles show up in its settings, just like on TradingView.
- 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.
Tips
- Start with simple indicators (moving averages, bands, levels) to check everything looks the same.
- Compare a few bars with TradingView on the same timeframe and session.
- Combine your scripts with what is already built in: anchored VWAP, volume profile and ICT concepts.