SuperCharting
Sign in Get started Account Open charts

Learn / Comparisons

Free Pine Script editor online: write and test Pine-compatible scripts

A free Pine Script editor online: write Pine-compatible version 6 scripts in the browser, see errors by line, add them to a chart, backtest and publish.

If you want a free Pine Script editor online, SuperCharting's Pine Editor lets you write Pine-compatible scripts in the browser, compile them, see each error with its line number and put the result on a live chart, all on a free account. It reads version 6 syntax, runs indicators and strategies, and lets you publish scripts as open-source, protected or invite-only. This page shows the workflow with a script you can paste and run, and lists what is not supported yet.

What you can do in the free Pine Script editor online

The editor is the Script Editor panel in the right-hand widget bar (it is titled Pine Editor inside). On a free account you can:

Scripts run on the site, not in your browser tab, so a heavy indicator does not freeze the page, and alerts from alertcondition() or alert() keep working after you close it.

What Pine-compatible means here

Pine Script is TradingView's language. SuperCharting has its own engine that reads the same syntax and runs it bar by bar the way the language describes: series with history (close[1]), var and varip, user functions, if, switch, for and while, tuples, user-defined types and enums, arrays and maps, and the ta., math., str., input., color., label., line., box., table. and strategy. namespaces. Plots, shapes, fills, background colours and bar colours draw on the chart, and input.* calls become settings in the indicator's dialog.

There are limits, and it is better to know them before you start:

How to write and test a script in SuperCharting

  1. Open a chart, for example NSE:RELIANCE on 1h.
  2. Click Script Editor in the right-hand widget bar. From the editor's menu choose New blank indicator.
  3. Replace the text with the script below.
  4. Click Add to chart. The RSI appears in its own pane with the two bands, and the background turns red or green outside them.
  5. Change 70 to 75 in the indicator's Settings (the button in its legend line) to see inputs at work. To change code, edit it and click Update on chart.
  6. Click Save script and give it a name.
  7. To get notified, click Create alert, choose the script as the source and its condition "RSI below lower band".
//@version=6
indicator("RSI with bands", overlay = false)
len = input.int(14, "RSI length", minval = 2)
upper = input.int(70, "Upper band")
lower = input.int(30, "Lower band")
r = ta.rsi(close, len)
plot(r, "RSI", color = color.purple)
hline(upper, "Upper")
hline(lower, "Lower")
bgcolor(r > upper ? color.new(color.red, 85) : r < lower ? color.new(color.green, 85) : na)
alertcondition(ta.crossunder(r, lower), "RSI below lower band", "RSI crossed below the lower band")

When it does not compile

Delete the closing bracket on the plot line and click Add to chart again. The console opens with an error and a line number. For an unclosed bracket the line is where the compiler ran out of text, the end of the script ("unexpected 'EOF'"), so look upward from there. Put the bracket back and the chart updates. This loop, edit, compile, read the line number, is the whole workflow. For a gentle start see write your first indicator and the Pine-compatible syntax primer.

Testing strategies in the same editor

Change indicator( to strategy(, add strategy.entry and strategy.close calls, click Add to chart, and the Strategy Tester panel shows its report: key stats, performance, trades analysis and the list of trades. The Optimise button in the tester searches your inputs for the best result. The free backtesting software page walks through a full example. Past results do not guarantee future results.

Sharing what you write

Publish script adds your script to the community library at /scripts. Open-source scripts show their code to everyone; protected scripts run on anyone's chart but keep the code private; invite-only scripts work only for the accounts you name, and you can change that list later. See invite-only scripts and the community scripts library.

If your account has TV Pilot switched on (the site owner enables it per account), it can draft and check a script for you in its own chat panel; see TV Pilot.

TradingView is a trademark of TradingView, Inc.; SuperCharting is not affiliated with it.

Frequently asked questions

Is the Pine editor free?

Yes. The editor, compiling, adding scripts to charts, the Strategy Tester and publishing are all on the free account, which is currently free for everyone.

Can I paste a script from TradingView?

You can paste any open-source script you have the right to use. Many compile as they are. If something is not supported, the console names the line so you can adjust it.

Which Pine version does it support?

The editor targets version 6 syntax (//@version=6). Many version 5 scripts also run, since most of the language is shared.

Do my scripts run when I close the browser?

Alerts set on a script keep running on the site. The chart itself is drawn when you open it again.

Can other people see my code?

Only if you publish it as open-source. Saved scripts are private to your account, and protected or invite-only scripts keep the code hidden.

Try it on a live chart

SuperCharting runs in your browser: charts, Pine-compatible scripts, the Strategy Tester, alerts and the screener, with Indian and global markets.

Create a free account More guides