SuperCharting
Sign in Get started Account Open charts

Learn / Comparisons

ChartScript vs Pine Script: moving scripts between TradingCharts, TradingView and SuperCharting

What ChartScript, the scripting language on Dhan's TradingCharts, shares with Pine Script, what it leaves out, its run limits, and how to move a script to SuperCharting or back.

ChartScript is the scripting language on TradingCharts, the free charting site from Raise Securities, the company behind the broker Dhan. It follows the same syntax as Pine Script, the language TradingView created, so most indicators and strategies written for one can be pasted into the other. SuperCharting also runs Pine-compatible scripts in v6 syntax. This page explains what carries across, what does not, and how to check a script after you move it. Facts about ChartScript come from TradingCharts' own documentation as published on 2 December 2026.

What ChartScript shares with Pine Script

ChartScript's documentation describes Pine Script as its "reference language". The same building blocks are there: indicator() and strategy() declarations, inputs, plot(), request.security(), arrays, maps, matrices, user-defined types, methods, libraries, lines, labels, boxes and tables. Any //@version= number is accepted, and the compiler behaves the same whatever version you write.

In practice, a script built from common built-ins (moving averages, RSI, MACD, pivots, sessions, boxes and labels) usually moves across with a copy and a paste.

What ChartScript does not support

TradingCharts lists these as compile errors or as values that always come back empty:

FeatureOn ChartScript
request.footprint() and the footprint.* accessorsCompile error; order-flow data is not exposed to scripts
request.currency_rate(), request.seed(), request.quandl()Compile error
request.economic()Compiles but returns na
bid and askCompile error; scripts get OHLCV only
Upcoming dividends and earnings estimatesNot available
strategy.max_drawdown_percent, strategy.max_runup_percent, margin liquidation priceNot available
syminfo.current_contract and analyst target pricesNot available
math.phi, math.rphi, plot.style_steplinebrCompile error
A method called straight on a series, such as close.myMethod()Compile error; assign the series to a variable first

Time functions such as hour and dayofweek default to Indian time (IST) unless you pass a time zone. If your script was written for exchange time on a foreign market, pass the time zone explicitly.

Run limits that change results

LimitChartScript on TradingChartsSuperCharting
History a script can see5,000 bars5,000 bars on Essential, 10,000 on Plus, 40,000 on Premium and Ultimate
Time for a full run10 secondsUp to 60 seconds per run
Time per live tick2 secondsUp to 60 seconds per run
Lines, labels, boxes per script500 each; polylines 100Set by the script's max_*_count, within the engine's limits
Custom scripts on one chart5Counts toward the plan's indicators per chart (3 on Essential up to 50 on Ultimate)

These limits are why the same script can look different on two sites. A script that draws zones from 10,000 bars back cannot see them on a 5,000-bar limit, and a heavy script that needs 15 seconds stops on a 10-second limit.

How to move a script to SuperCharting

  1. Copy the whole script, including the //@version= line.
  2. On SuperCharting, open the Script Editor from the chart toolbar and paste it into a new script.
  3. Fix anything the compile check underlines. Errors show the line number; the Pine Script errors guide explains the common ones.
  4. Add the script to the same symbol and timeframe you used before.
  5. Compare five or six values on recent bars with the old chart. Small differences in the first bars are normal when the two sites load different amounts of history.

Moving the other way works the same: paste into TradingCharts' editor, then check its "What is not supported" list for anything the compiler rejects.

FAQ

Is ChartScript the same as Pine Script?

No. It is TradingCharts' own language that follows Pine Script's syntax. Most common scripts run on both, but some functions and limits differ, as the tables above show.

Can I use my TradingView indicators on TradingCharts or SuperCharting?

Most common ones, yes, by pasting the source code. Neither site runs every Pine Script exactly as TradingView does, and invite-only or protected scripts cannot be copied because their source is hidden.

Why does my script time out on one site and not another?

Each site sets its own run limit. TradingCharts allows 10 seconds for a full run; SuperCharting allows up to 60 seconds. Long loops over many bars, many request.security() calls and thousands of drawings are the usual causes. Reduce them, or run the script on a shorter timeframe range.

TradingCharts and Dhan are trademarks of their owners, and TradingView and Pine Script are trademarks of TradingView, Inc. SuperCharting is not affiliated with Dhan, Raise Securities or TradingView.

Try it on a live chart

SuperCharting is an AI-enabled charting and coding platform in your browser: charts, Pine-compatible scripts with AI Auto-fix, the Strategy Tester, alerts and the screener.

Open a live chart Create a free account More guides