Two minutes, start to finish

How to install TradingView indicators from code

Every indicator on this site arrives as a Pine Script file — a plain text file full of code. Getting it onto your chart takes three steps and no programming knowledge whatsoever. Here is the whole process.

Works on the free plan No coding needed Nothing to install

Walkthrough video goes here —
add its ID to $HOWTO_VIDEO at the top of this file

Step 01

Copy the code

Download the indicator from this site and open the file. It will open in whatever text editor your computer uses — Notepad on Windows, TextEdit on a Mac. What you see is the source code.

Select everything and copy it. On Windows that is Ctrl+A then Ctrl+C; on a Mac, Cmd+A then Cmd+C. Copy all of it, including the first line that starts with a double slash — that line tells TradingView which version of Pine Script to use, and leaving it out is the most common reason an install fails.

If the file opens in your browser instead of a text editor, that is fine. Select the text on the page and copy it exactly the same way.

Step 02

Open the Pine Editor

Go to TradingView and open any chart. Along the bottom of the screen there is a row of tabs — Stock Screener, Pine Editor, Strategy Tester. Click Pine Editor and a panel opens at the bottom of the window.

It will already contain a few lines of example code. Delete all of it. Click inside the panel, select everything, and remove it so you are looking at an empty editor. Then paste in the code you copied.

Can't see the Pine Editor tab? Drag the bottom edge of the chart upward — the panel is often collapsed to nothing. It is available on every plan, including the free one.

Step 03

Save, then add to chart

Click Save at the top right of the editor and give it a name. This saves it to your own TradingView account, so it is there whenever you want it and you never have to repeat this process for that indicator again.

Now click Add to chart, just to the right of Save. The indicator appears immediately. Its settings can be changed the same way as any built-in indicator — hover its name on the chart and click the gear icon.

That is the whole process. Once saved, the indicator lives under Indicators → My scripts, and you can add it to any chart in two clicks.

The questions people actually ask

Do I need a paid TradingView account?

No. The Pine Editor is available on the free plan, and everything on this page works with it. The free plan limits how many indicators you can run at once on a single chart, which is the only thing you may bump into.

It says there is an error. What now?

Nine times out of ten, something was missed when copying. Go back, select the entire file including that first line beginning with a double slash, and paste it into an empty editor. If it still complains, send us the error message and we will look at it.

Will this change my charts permanently?

Only the chart you add it to, and you can remove it at any time by hovering its name and clicking the cross. Saving the script to your account changes nothing about your existing setups.

Is it safe to run code from the internet?

Pine Script runs inside TradingView and can only draw on charts and read price data. It cannot access your account, place trades or reach anything outside the chart. That said, the code is readable — you are welcome to read ours before running it, and we would encourage that habit generally.

What is the difference between an indicator and a strategy?

An indicator draws on your chart and leaves the decisions to you. A strategy places virtual trades so an idea can be backtested and measured over real history. Both install exactly the same way.

Browse the free downloads Watch the videos