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:
- Start a New blank indicator, or open a script from a file with Open file….
- Type with line and column shown in the status bar ("Line 12, Col 5") and jump with Go to line/column.
- Compile and put the script on the active chart with Add to chart, then push edits with Update on chart.
- Read errors in the console under the code. Each error names the line, for example "line 5: unexpected 'EOF'".
- Save scripts to your account with Save script or Save as…, so they open on any browser.
- Publish with Publish script as open-source (code visible), protected (code hidden) or invite-only (only named accounts may use it).
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:
request.securityruns the script on a higher timeframe of the chart's own symbol, so any expression works there. A different symbol in its first argument is not supported yet: the chart's own market is used instead.request.security_lower_tfsees real intraday bars (1, 5, 15 or 60 minutes) for the newest bars only; older chart bars get empty arrays.importworks for the libraries bundled with the site (some of TradingView's common public libraries). A library that is not bundled gives a "library not found" error.- Very long scripts on very many bars take longer to refresh. Keep the visible history reasonable while you develop.
How to write and test a script in SuperCharting
- Open a chart, for example
NSE:RELIANCEon 1h. - Click Script Editor in the right-hand widget bar. From the editor's menu choose New blank indicator.
- Replace the text with the script below.
- Click Add to chart. The RSI appears in its own pane with the two bands, and the background turns red or green outside them.
- Change
70to75in 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. - Click Save script and give it a name.
- 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.