Guide
How to Run a Pine Script Indicator on TradingLead
To run a Pine Script indicator on TradingLead, open a chart, open the Indicator Studio tab, choose TLScript-Pine, paste your //@version=5 or //@version=6 indicator, review the compatibility label, click Compile and then Apply. TradingLead supports a documented Pine v5/v6 indicator subset and validates source before execution, so some scripts need small changes first.
This guide shows how to take a Pine Script indicator — your own or one you have permission to use — and run it on a TradingLead chart, for example a Nifty 50 stock on a 15-minute chart.
Before you start, one honest note: TradingLead supports a documented Pine v5/v6 indicator subset. Source is validated before execution. Many common indicators run directly, some run with small visual differences, and some need changes. Studio tells you which before anything touches your chart.
Step 1: Open a chart
Go to tradinglead.in/charts, sign in, and load the symbol and interval you want. The indicator will be calculated on the candles this chart has loaded from its data feed.
Step 2: Open Indicator Studio in TLScript-Pine mode
Select the Indicator Studio tab in the bottom panel. Choose TLScript-Pine as the language. You can dock Studio below or beside the chart, or pop it out to its own window if you have a second screen.
To start from a blank guided template instead of pasting, click New — it inserts only guidance comments starting with //@version=6.
Step 3: Paste your script
Paste the full source. It must begin with a version line:
//@version=6
indicator("EMA trend", overlay=true)
length = input.int(20, "Length", minval=1)
src = input.source(close, "Source")
plot(ta.ema(src, length), "EMA", color=color.teal)
Scripts with //@version=1 to 4, an unknown future version, or no version line are rejected.
Step 4: Read the compatibility label
As soon as you paste, Studio checks the source locally and shows one label:
| Label | What it means | What to do |
|---|---|---|
| Works directly | No known compatibility changes found | Compile and Apply |
| Works with approximations | Runs, with listed differences (e.g. marker glyph shapes, arrow sizing, fill gradients, manual price entry) | Review the notes, then Compile and Apply |
| Needs conversion | Belongs to another workflow, e.g. a strategy() script | Use Apply & backtest / Backtesting instead |
| Unavailable | Uses a capability TradingLead doesn't provide | Remove or replace the listed lines |
Common reasons for Unavailable:
request.financial,request.earnings,request.dividends,request.splits,request.economic,request.currency_rate,request.seedorrequest.quandl— TradingView-hosted data services.import user/library/1— published TradingView libraries are not fetched. Copy the functions you need into your script.
request.security is fine on charts: it reads other symbols or timeframes from the same authorized data feed.
Step 5: Fix problems (optionally with AI)
Every problem in the Problems list shows its line and column. Click one to jump to it.
If you want help from an AI assistant:
- Click Copy fix prompt. Studio builds a prompt from the exact problems and your current code. Nothing is sent anywhere automatically.
- Paste it into the AI you use and copy its answer (a full replacement script or
SEARCH/REPLACEblocks). - Click Paste AI fix and paste the answer. Studio shows a preview, re-checks compatibility and compiles it in the sandbox.
- Accept the fix. It updates only your unsaved draft — not the chart, not your library.
Step 6: Compile and Apply
- Click Compile to check the source against the runtime. Nothing changes on the chart yet.
- Click Apply to add the indicator to the active chart. Studio reports progress through preparation, history, calculation and drawing.
If you select an indicator that is already on the chart, the button becomes Review update, which shows the source/input changes and replaces only that instance.
Step 7: Adjust inputs and style
Your input.* declarations become a settings form. group creates sections, inline puts related inputs on one row, and tooltip adds help. Style-only changes (colour, width, visibility) don't rerun the script; input changes recalculate it. Settings stay open while you click the chart, so you can compare.
Step 8: Save it
Click Save (or Save as for a copy). The source and input values go into your library. Saving never changes what is applied on the chart, and applying never saves.
Your saved indicator now appears in the chart's Indicators dialog under My saved indicators, so you can add it to any chart like a built-in indicator. To move scripts to another browser, use Export library backup and Import library backup in the Library panel.
Tips for Indian markets
ta.vwapresets on each exchange trading day, which suits intraday NSE/BSE charts. See VWAP.- For Indian cash equities and indices in the built-in catalogue,
syminfo.currencyis INR. - Test indicator ideas candle by candle with bar replay before relying on them.
Troubleshooting
- "Chart not ready" — wait for the chart to finish loading, then Apply again.
- Timeout — each operation has a 30-second limit; very heavy loops (over 20,000 iterations per loop) fail explicitly. Simplify the calculation.
- Strategy script — Pine strategies run through backtesting. See Backtest a Pine strategy.
- Alerts —
alertconditionevents stay local. You can hand a condition to the Alerts panel as a local rule evaluated while the app is open; push, email and webhook delivery for indicator conditions are not available.
Indicators are tools for analysis, not trade recommendations.
Steps
- Open https://tradinglead.in/charts and load the symbol and timeframe you want.
- Open the Indicator Studio tab in the chart's bottom panel and choose TLScript-Pine.
- Paste your Pine indicator; make sure it starts with //@version=5 or //@version=6.
- Read the compatibility label: Works directly, Works with approximations, Needs conversion or Unavailable.
- Fix listed problems yourself or with Copy fix prompt and Paste AI fix.
- Click Compile, then Apply to add the indicator to the chart.
- Adjust inputs in the indicator settings; click Save to keep it in your library.
Limitations
- Only the documented Pine v5/v6 subset runs; hosted data requests and library imports are rejected.
- Pine alerts are local chart events, not server notifications.
- Saved scripts are stored for your account in this browser/device; export a backup to move them.
Frequently asked questions
- Why does my Pine script show 'Unavailable'?
- It uses something TradingLead does not provide, most often a TradingView-hosted request such as request.financial, request.earnings or request.dividends, or an import of a published library. Remove or replace that part to run the rest.
- My script is version 4. Can I run it?
- Not as-is. Only //@version=5 and //@version=6 are accepted. Convert the script to v5 or v6 syntax (an AI assistant can help using Copy fix prompt), then paste it again.
- Why isn't my strategy showing up as an indicator?
- Pine strategy() scripts are not chart indicators on TradingLead. In Studio the main button becomes Apply & backtest, which runs it through Backtesting.
- Will the values match TradingView exactly?
- Not guaranteed. TradingLead runs its own documented Pine v5/v6 subset on your chart's data feed. Different data, sessions and documented numerical choices can produce small differences.
- How do I add my saved Pine indicator to another chart?
- Open the chart's Indicators dialog and look under My saved indicators, or open it from the Studio Library and click Apply.
Related
Last updated: