Install a Pine v6 Indicator and Check It Doesn't Repaint
To install a Pine Script v6 indicator you bought as source code, open TradingView's Pine Editor, start a new indicator, replace the template with the code from your download, save it and click Add to chart. It takes about a minute and works on TradingView's free plan; TradingView's own first steps page shows where the Pine Editor opens. To check that it doesn't repaint, watch where its markers print on live bars and compare them with where they sit after those bars close: a marker that moves, appears late on an old bar or vanishes is repainting.
This guide walks through both steps for any indicator delivered as a .pine source file, including the Pine Script v6 indicators sold on SML Dual Market.
Before you start
You need three things:
- A TradingView account. The free plan runs custom indicators. It does cap how many indicators you can keep on one chart at once, so check your plan's limit if you already run several.
- The source file. Indicators sold as source arrive as plain text, usually a .pine or .txt file inside the download. Open it in any text editor and you will see code that begins with a version line such as
//@version=6. - A desktop browser. You can view indicators on the TradingView phone app, but pasting and saving code is far easier on a computer.
Step by step: install the indicator
- Open a chart on TradingView for any symbol.
- Open the Pine Editor. It sits in the panel at the bottom of the chart (or in the side panel, depending on your layout). TradingView's first steps page shows it opening below the chart.
- Start a new indicator. Use the editor's menu to create a new indicator script. TradingView fills the editor with a short template.
- Replace the template. Select everything in the editor, delete it, then paste the full contents of the source file from your download. Keep the
//@version=6line at the top: it tells TradingView which Pine Script version to compile. - Save. Give the script a name you will recognize. It is saved privately to your own account, not published.
- Add to chart. Click the add-to-chart button in the editor. The indicator appears on the chart or in its own pane.
- Open the settings. Click the gear icon next to the indicator's name to adjust lengths, multipliers, sessions, colors, label styles and table size. Each input is explained in the user guide that came with the download.
- Set alerts if the script has them. Open TradingView's alert dialog, choose the indicator as the condition and pick the alert it offers.
Once saved, the script stays in your account. You can add it to any other chart from the Indicators menu under your personal scripts, and you can edit the code at any time because you own the source.
If the script won't compile
Pine Script versions are not interchangeable. If you see compile errors, check these in order:
- The version line. It must stay at the very top. Deleting it or changing it to an older version breaks v6 code.
- A partial paste. If the last lines are missing, the editor reports unexpected end of input. Copy the whole file again.
- Hidden characters. Pasting through a word processor can turn straight quotes into curly quotes. Copy from a plain text editor instead.
Indicators on SML Dual Market are compile-checked in the Pine Editor before they are listed, so a clean paste of the delivered file should compile as is. If it doesn't, the 7-day money-back guarantee applies.
What repainting is
An indicator repaints when what it showed on a live bar changes after the fact. TradingView's Pine Script manual has a full page on repainting, which defines it as "script behavior causing historical vs realtime calculations or plots to behave differently." A buy arrow that appears on a candle, then disappears when the candle closes, is repainting. So is a swing high that is drawn three bars after the real high but then labeled as if it was known at the high.
Repainting matters because a backtest or a screenshot of a repainting indicator looks far better than the indicator ever was live. You were never able to act on those perfect arrows.
The usual causes in Pine Script are:
- Using the unconfirmed live bar. Values computed on the current, still-moving bar change on every tick. Scripts that only act once
barstate.isconfirmedis true avoid this; the repainting page of TradingView's manual covers the same fix. - Pivots without a stated lag. A pivot high with 5 bars on each side cannot be known until 5 bars after the high. Honest scripts mark it at the confirmation bar, or say plainly how late it is.
- Higher-timeframe data that peeks ahead. A
request.securitycall that reads an unfinished higher-timeframe bar, or that uses lookahead without offsetting, can show data that was not available at the time.
How to check an indicator for repainting
You can test any indicator yourself, whether you bought it or found it free:
- Watch it live. Put it on a 1-minute or 5-minute chart during market hours. Note each marker the moment it prints, then look again after several bars have closed. Every marker should still be on the same bar.
- Use Bar Replay where your plan allows it. Replay a past session bar by bar and compare what the indicator showed at each step with what it shows on the finished chart.
- Reload the chart. Markers that shift position after a refresh were computed on data that changed.
- Read the code. With the source in hand, search for
barstate.isconfirmed, pivot functions andrequest.security. With a hidden invite-only script, you cannot do this step at all, because invite-only scripts give access without the code, which is the biggest argument for buying source code.
Indicators sold with a non-repainting rule
The six indicators in the Pro Pine Indicators Bundle are built to be non-repainting: every event is computed on confirmed bars only, and the pivot-based tools mark events at the confirmation bar and disclose that lag in their guides. A marker, once printed, does not move or disappear.
The Opening Range Breakout indicator follows the same rule for its flags: only the first confirmed close beyond the frozen range is flagged, and a printed flag never repaints.
The Market Structure and Liquidity Sweep indicators are good test pieces for the checks above, because both depend on confirmed pivots and say exactly how many bars of lag that adds.
Every indicator on SML Dual Market is a one-time purchase with the full Pine Script v6 source, so you can run every check in this guide on it before you rely on a single marker. None of them predicts price or shows a win rate; they measure and draw, and the decisions stay yours.
Quick answers
- Do I need TradingView Pro? No. The free plan runs custom Pine Script indicators.
- Will the indicator disappear if I stop paying? Not with a one-time purchase of the source. It is saved in your account and the file stays on your computer.
- Can I share the code? Check the license terms in your download. Buying the source gives you the right to use and adjust it for yourself; it does not normally give you the right to resell or publish it.
Frequently asked questions
How do I add a Pine Script indicator to TradingView?
Open the Pine Editor, create a new indicator, replace the template with the full source code, save it and click Add to chart. It is saved privately to your account.
Why won't my Pine Script v6 code compile?
Usually the //@version=6 line was removed or changed, the paste was cut off, or curly quotes came in from a word processor. Paste the whole file again from a plain text editor.
How can I tell if a TradingView indicator repaints?
Note where markers print on live bars and check them again after the bars close, use Bar Replay where your plan allows, and reload the chart. Markers that move, appear late or vanish are repainting.
What makes a Pine Script indicator repaint?
Acting on the unconfirmed live bar, pivots shown without their confirmation lag, and higher-timeframe data read before that bar has closed.