To add Pine Script to TradingView, open the Pine Editor, create a new script, replace its template with your code, save, then select Add to chart. If you downloaded a .pine file, open it in a plain-text editor and copy the code first. For an existing community indicator, search its name in the Indicators dialog instead.
Somewhere on your machine sits a .pine file. Maybe you bought it, maybe an AI wrote it, maybe a friend exported theirs. The steps below take that source code onto your chart; you do not need to publish it or make it public.
Where is the Pine Editor in TradingView now?
Start with the Pine icon on the chart's right toolbar. TradingView's current help describes a floating editor that you can dock to the right, detach into another window, or place below the chart with Move to bottom. The launch icon and the editor's position are different things. TradingView: Pine Editor layout and controls.
If the Pine Editor is not showing at the bottom, look for that right-toolbar icon first. A tutorial screenshot may use a different editor layout; the paste, save and add-to-chart workflow stays the same.

How do I open a .pine file?
A .pine source file contains plain text. Open it with Notepad, VS Code, or another text editor, then copy the complete script. Paste the code itself into TradingView, including its //@version line. Copying the filename, dragging the file onto a chart, or pasting a Markdown code fence does not replace this step.
How do I add a script I have as source code?
Paste it over the editor's template, then add it to the chart. The whole route:
- Open the Pine Editor from the right rail.
- Click the script-name dropdown in the editor's header and create a new indicator. The editor fills in a small template.
- Select all in the editor and paste your script over the entire template — not underneath it, not inside it. All of it.
- Choose Save script from the script-name menu and give it a name.
- Select Add to chart in the editor. If compilation succeeds, the script appears on your chart. You can reopen your saved code from My scripts in the Indicators dialog.
This follows TradingView's documented create, replace, save and add workflow.
Step 3 is where most installs die, and we know because we've worked the support ticket: a compile error complaining about two declarations. That's what happens when a script gets pasted after the template instead of over it — the file ends up with two indicator() declarations, and the compiler refuses both. Select all, paste, gone.
The other classic: a script written for an old Pine version. The first line of any script declares its version (ours declare //@version=6); a years-old snippet from a forum may need migration before it compiles. The editor's error console tells you plainly — read it before assuming the script is broken.

How do I add a community indicator instead?
If you don't have source code and just want an existing tool: Indicators in the top toolbar opens the dialog TradingView calls Indicators, metrics, and strategies. Type what you want in the search box, click a result, and it's on your chart — that's the entire flow.
The left rail of that dialog is the map worth knowing: My scripts (everything you saved from the editor), Purchased, the built-in sets (Technicals, Fundamentals), and the Community shelves — Editors' picks, Top, Trending. Community scripts run from shared code you didn't write; some publish their source openly, some are closed. Which kind you're running matters the day a signal surprises you.

Which route should you actually want?
Where we're biased, priced honestly: our Pine v6 tools ship as .pine source files you add with the steps above — paste, save, add to chart — with an AI extension kit so you can make a model explain any line before you trust it. If you want to practice the route with zero spend first, VP Lite is free and full-source; same file type, same two minutes, nothing to buy.
The honest caveat either way: adding a script is plumbing. It changes what your chart shows, not whether the idea underneath has an edge — auditing that is its own two minutes, and it's the better use of your skepticism.
Paste over the template, save, add to chart — then check what the script actually does.


