Zeal TerminalOpen the chart
Zeal Terminal / Guides

How to apply a Pine Script to the chart

Updated 26 November 2026

Zeal Terminal runs Pine Script in your browser, so you can try an indicator or write your own without installing anything or signing in. This guide takes a script from the editor to the chart: open the Pine editor, put a script in it, fix anything the compiler flags, and add it to the chart. It works for every Pine version, //@version=1 to //@version=6.

Try it in Zeal Terminal

Steps

  1. Pine editor. Open the Pine editor. If you have closed it, bring it back from the windows icon in the rail.
  2. Code editor. Click in the editor and write or paste your script. This one draws a 20-bar simple moving average over the price.
  3. Add to chart. Click Add to chart. The script is compiled and drawn on the chart.
  4. Script settings. Your script now has a row in the chart legend. Use its settings to change inputs and colours, the eye to hide it, or the cross to remove it.

What the Add to chart button checks

Before anything is drawn, the script is compiled. If it does not compile, the button is greyed out and the editor shows the message directly under the line that failed, with a red squiggle under the token. Fix the line and the button comes back; there is no separate "check" step.

Common mistakes

  • Missing version line. A script with no //@version= comment is read as Pine v1, as on TradingView. Put //@version=6 on the first line unless you mean an old script.
  • Mixing versions. ta.sma is v5 and v6 syntax; in v4 the same function is sma. If a name is "undeclared", check the version line first.
  • Drawing in the wrong place. An indicator that is on the price scale needs overlay=true in its indicator() call; without it the plot goes to its own pane below the chart.
  • Expecting a strategy report from an indicator. The strategy tester only fills in for scripts that start with strategy( rather than indicator(.

Frequently asked questions

Do I need an account? No. The editor, the chart and the tester work signed out. An account is only needed to save scripts and layouts.

Is anything uploaded when I add a script? No. Scripts are compiled and run in your own browser tab.

Can I use a script from TradingView? Paste it into the editor. Pine v1 to v6 is supported; if a built-in is not yet available the compiler names it.

Related guides

  • How to backtest a Pine Script strategy and read the results
  • How to find the best Pine Script parameters with the Optimizer

This guide is replayed by an automated test on every release, so the steps here match the app as it is today.

PricingContactRefundsPrivacyTermsCookiesDisclaimer

© 2026 Zeal Terminal. An independent project, not affiliated with TradingView, Inc.