Pine Script v6: editor, source and how to add it
Pine Script v6 is TradingView’s language for chart studies. A pine script indicator is a script you run on your own chart. It draws lines, zones, labels or alerts from rules in the code. You do not need a paid TradingView plan to run one. The plan only limits how many indicators fit on a single chart.
This guide covers what Pine Script v6 is, how to open the Pine Script editor in TradingView, how to add pine script to TradingView from a .pine file, and what to check before you trust a script. ZynIQ sells that source as a one-time download, so the steps below are the same ones you use after you buy.
What Pine Script v6 actually is
TradingView Pine Script is a small language built for price bars, not for general software. Every script declares its language version at the top with a line such as //@version=6. That line tells the Pine Editor which syntax and built-in functions to allow. A //@version=5 file will not accept v6-only functions until you migrate it and change the directive.
A typical pine script indicator reads open, high, low, close, volume and bar time, computes values as bars update, plots lines, boxes, tables or labels, and can fire alerts when a condition is true.
It is not a broker and it is not a signals service. Nothing it draws is a recommendation to buy or sell. Trading is risky and you can lose money. Treat every script as an analysis tool you still have to test.
Two script types show up in the editor. An indicator uses indicator() and only plots. A strategy uses strategy() and can also simulate orders in TradingView’s strategy tester. Most chart tools you add by hand, including the ZynIQ studies, are indicators. They mark structure or events. They do not place trades.
How to open the Pine Script editor in TradingView
The Pine Editor is part of the chart page. You do not install a separate program.
- Open any chart on TradingView in a browser. The web chart is the usual place to edit.
- Look at the tabs under the chart. Pine Editor sits with Strategy Tester and Replay.
- Click Pine Editor. A code panel opens under the candles.
- Drag the top edge of the panel up if you need more room to read.
That is how to open pine script editor in TradingView. On a narrow window the tab can sit behind another control. If you cannot see it, use the search box at the top of the TradingView page and type Pine Editor.
From the editor you can start a blank file: New, then Indicator. TradingView inserts a short v6 template with indicator() already in the header. That template is a fair first file if you want to learn pine script by changing one plot at a time.
How to add Pine Script to TradingView from a file
When you hold the source, you add it yourself. How to add pine script in TradingView is paste, save, then add to chart. A personal script does not use an invite list.
- Open the
.pinefile in a plain text editor on your computer and copy everything. - On TradingView, open the Pine Editor as above.
- Select any text already in the panel and paste so the new script replaces it. The first lines should show
//@version=6and anindicator(...)call, orstrategy(...)if that is what you meant to load. - Click Save, give the script a name you will recognise, and confirm. TradingView stores it on your account as a personal script.
- Click Add to chart. The pine script indicator should appear on the symbol and timeframe you have open.
- Open the cog on that study to read its inputs. Create alerts from the chart (Alt+A on desktop) only after the script is loaded. Prefer Once per bar close when the script is written to decide on closed candles.
If the editor shows a red error, read the first message. Usual causes are a truncated paste, a missing //@version= line, or a file written for another Pine version. Do not strip header comments from a licensed file to tidy it: some vendors put your email and order number in those lines on purpose, because the file is licensed to you personally.
You add the same saved script to other charts from the Indicators menu, under your personal scripts. You do not paste it again unless you want a second copy. If you edit the code later, save, then create alerts again. TradingView keeps the old settings on an alert you already created.
What to read in the source before you trust it
Owning the source is useful only if you look at it. You do not need to write scripts for a living to check a few facts.
| Check | What you want to see |
|---|---|
| Version | //@version=6 at the top |
| Type | indicator() if it should only plot |
| Overlay | overlay = true on candles, false for a separate pane |
| Closed bars | Logic that does not treat the forming bar as final |
| Other timeframes | request.security calls, which you should know are there |
| Alerts | alert() or alertcondition() tied to confirmed bars |
| Inputs | Named settings you can change without editing code |
A script that is meant to lock at candle close should not move a mark after that bar has closed. Open a historical chart, note a marked event, refresh, then use Replay around that bar. If the marker appears, vanishes or jumps on bars that are already closed, do not use that script for alerts.
ZynIQ writes its studies so that signals and levels lock at candle close. Values can still move while a candle is forming (FAQ). That is a behaviour you can verify in the source and on Replay. It is not a claim about results.
Where a bought Pine v6 file fits
Community scripts are easy to add from the Indicators search. Quality varies, documentation is often thin, and you cannot always see how a mark is built. Closed-source subscription tools can leave your chart when you stop paying.
ZynIQ is built for the case where you want the code. You buy a pine script indicator, download the Pine v6 source, and keep it on any TradingView plan, including the free one. There is no invite list and no TradingView username to send. After you pay, you paste, save and add to chart with the steps above. Your purchase is the version on sale when you buy it. Newer versions are not included for free.
If you only want one clean file to practise the workflow, start with Breakout Essentials ($29, one payment). It marks a long or short when a closed candle finishes beyond the previous 20-bar range, and it draws a risk ladder from the signal close. It shows no performance figures. The full list is on the indicators page.
Checks that still apply once it is on the chart
Source is not the last step.
- Match session settings to how the script measures time. Many session tools use New York time.
- On futures, know whether the chart is regular hours or extended hours, and whether your feed is delayed. Delayed data delays marks by the same amount.
- On symbols with no volume, volume filters may pass rather than block. That is normal on some cash indices.
- After you change inputs, delete the old alert and create it again.
- Use Replay on a stretch of history you do not trade. Watch whether boxes and labels appear only when the bar closes.
Those checks do not tell you to take a trade. They tell you whether the pine script indicator is doing what its settings claim.
Pine Script v6 is the language. The Pine Editor is where you paste it. Adding a script is save, then add to chart. The useful work is reading the header, checking closed-bar behaviour, and testing on Replay.
If you want that workflow with source you pay for once and keep, pick a ZynIQ study and run the steps on your own chart. Breakout Essentials is the lightest place to start: https://zyniq.io/indicator/breakout-essentials
Questions people ask
How do I open the Pine Script editor in TradingView?
Open a chart in the browser, then click the Pine Editor tab under the chart, next to Strategy Tester and Replay. If the tab is hidden, search for Pine Editor at the top of the TradingView page.
How do I add a Pine Script v6 file to a TradingView chart?
Copy the whole .pine file, paste it into the Pine Editor so it replaces any existing text, click Save, then click Add to chart. Check that the first line is //@version=6 before you save.
Do I need a paid TradingView plan to run a pine script indicator?
No. A personal Pine Script v6 indicator runs on every plan, including the free one. The plan only limits how many indicators you can put on one chart.
What should I check in Pine Script v6 source before I trust it?
Confirm //@version=6, whether it is an indicator or a strategy, and whether marks are decided on closed bars. Use Replay on closed history: if a mark moves after the bar has closed, do not use that script for alerts.
Does a personal .pine file need a TradingView invite?
No. A script you paste and save is stored as a personal script on your account. You add it from the Indicators menu on any chart. Invite lists are a different publishing model and are not required for that workflow.