Build TradingView indicators, strategies, and libraries in VS Code with full Pine Script v6 language intelligence.


Quick start
- Install the extension, then open a folder with Pine Script files or open any
.pine file.
- Start typing
ta., math., or strategy. to browse built-ins with inline documentation.
- Create a script instantly: Pine Script: New Indicator or Pine Script: New Strategy from the Command Palette, or right-click a folder or a
.pine file in the Explorer.
New to the extension? Run Help: Open Walkthrough… and pick Get Started with Pine Script.
Write faster with complete Pine v6 IntelliSense
Stop hunting through documentation. Autocomplete, hover docs, and signature help cover every built-in function, variable, constant, and namespace in Pine Script v6, plus your own functions, types, parameters, and variables.
Hover any built-in and follow View in Pine Script Reference to open the official TradingView page. Semantic highlighting keeps your own symbols visually distinct from built-ins.

Catch mistakes as you type
Real-time diagnostics flag missing or non-v6 //@version declarations, incomplete indicator() and strategy() configuration, import resolution problems, and common Pine pitfalls. Everything lands in the Problems panel, and quick-fix code actions repair the common cases in one click: add //@version=6, add overlay=, or wrap a block with barstate.isconfirmed.

Find your way around any script
Land on the symbol you need without scrolling, even in an unfamiliar thousand-line strategy.
- Symbol navigation: Go to Definition (
F12), Go to Type Definition, Find All References (Shift+F12), and Rename Symbol (F2)
- Workspace symbols: jump to any user-defined Pine symbol across your
.pine files with ⌘T / Ctrl+T
- Outline and breadcrumbs: functions, variables, user-defined types, and inputs at a glance
- Code lens: usage count above every user-defined function — off by default, because the TradingView Pine Editor draws none; turn it on with
pinescript.codeLens.enable.
- Smart folding for function bodies,
type blocks, and // #region markers
- Document links on built-in call sites and the version header

Keep code clean without the busywork
Let the editor handle the mechanical work while inferred types and documentation stay in view.
- Auto-formatter: whole document, selection, or on-type. Normalizes 4-space indentation, trims trailing whitespace, collapses excess blank lines. Run it with Pine Script: Format Document,
Shift+Alt+F, or the pinescript.formatDocument command.
- 40+ Snippets covering indicator, strategy, and library scaffolds, TA patterns, control flow, drawing objects, and tables.
- Inlay hints show inferred types, the effective overlay value on
indicator() and strategy() calls, and parameter names at call sites — off by default, because the TradingView Pine Editor draws none; turn them on with pinescript.inlayHints.enable.
- Color picker for
#RRGGBB, color.rgb(), and every color.* constant.
- File templates for new indicators and strategies; create libraries with the
library snippet prefix.

Imports and libraries
Pine has one import form, import Author/Lib/N; a quoted file path is a compiler syntax error and is reported as one. Third-party imports are always accepted and never flagged as unknown, and popular community libraries resolve automatically with member hover, completion, and signature help from metadata bundled with the extension. For a private library, or any library that is not bundled, drop the source at .pine-libs/Author/Lib/N.pine in your workspace root and it resolves the same way. Unresolved third-party imports show a subtle hint, never a warning.
Resolution is entirely offline. The extension makes no network requests — it never contacts TradingView or any other service to resolve a library, so nothing leaves your machine and everything works without a connection.
AI Integration
Pine Script DevKit ships a @pinescript GitHub Copilot Chat participant and a set of Language Model Tools for Copilot Agent mode, all grounded in local Pine v6 metadata rather than guesswork.
Ask @pinescript to explain selected code, or use /explain, /indicator, and /strategy to generate scaffolds. In Agent mode the tools #lookupBuiltin, #searchBuiltins, #getDiagnostics, #workspaceDiagnostics, #scaffold, #applyScaffold, and #suggestFix become available when a .pine file is in context. Bundled chat instructions, prompt files, and the pine-indicator skill attach automatically.
- Model Context Protocol server: on VS Code desktop the extension registers a local MCP server named
pine-script-devkit, so any MCP-capable assistant in the same window discovers the same Pine tools under their pinescript_* names. It listens on loopback only and is desktop-only, unavailable in VS Code for the web. Toggle it with pinescript.mcp.enable.
- Other agents: run Pine Script: Generate Agents Guidance to write a managed Pine workflow section into
AGENTS.md at your workspace root.
- Workspace Trust:
@pinescript requires Workspace Trust, and #applyScaffold additionally needs an open workspace folder. Core language features — syntax, IntelliSense, diagnostics, formatting, and navigation — keep working in Restricted Mode.
AI-generated code may be incomplete or inaccurate. Always review, test, and validate it in TradingView before relying on it.
Settings
Everything works out of the box, so reach for these only when you want to change something. They all live under Pine Script in the VS Code Settings editor, where you will also find the complete list.
pinescript.diagnostics.enable — real-time diagnostics
pinescript.inlayHints.enable — master switch for inlay hints (off by default, like the Pine Editor)
pinescript.workspaceSymbols.enable — Go to Symbol in Workspace for Pine symbols
pinescript.inlineCompletions.enable — opt-in Pine ghost text, off by default so it never fights Copilot
pinescript.mcp.enable — expose Pine tools to MCP-capable hosts, desktop only
pinescript.hover.showDocLinks — TradingView reference links in hover, completion, and signature help
Requirements
- VS Code 1.125.0 or higher
- GitHub Copilot Chat for
@pinescript and Agent mode tools
Full language features, Copilot integration, and the MCP server run on VS Code desktop. The web extension on vscode.dev and github.dev provides language features and Copilot AI where trust allows, without the MCP server. Virtual and remote workspaces are supported; workspace-wide reference search is the one feature that is not available there.
Localization
The extension UI is localized for 14 VS Code display languages, selected automatically by VS Code.
Privacy and crash reporting
The extension makes no network requests of its own: it does not contact TradingView or fetch anything at runtime, and every language feature is served from what ships in the package and what is in your workspace. The one exception is opt-in crash reporting, described below.
When VS Code telemetry is enabled and telemetry.telemetryLevel is not off, the desktop extension may send sanitized crash reports to Sentry EU ingest. Reports go to the extension author, not to Microsoft. The web extension host sends nothing. Tune the rate with pinescript.telemetry.sentry.sampleRate; changes apply immediately.
- Sent: error type and message with sensitive details removed, extension and VS Code versions, platform, stack traces, and anonymous release-health session data keyed by the anonymized
vscode.env.machineId identifier so crash-free rates can be computed.
- Never sent: your Pine Script source or document text, auth tokens, cookies, raw file paths, install events, performance tracing, session replay, or profiling.
Support
- Questions: Marketplace Q&A
- Bugs and feature requests: email sergeychereshnyuk@hotmail.com
A bug report travels best with three things: the diagnostic code shown in the Problems panel, the smallest script that triggers it, and what the TradingView compiler does with that same script. Those three turn a report into something reproducible.
If Pine Script DevKit helps your workflow, you can buy me a coffee.
Security
The published VSIX passed the VirusTotal release gate before Marketplace publish for version 2.9.7.
No security vendors flagged this file as malicious. 0 of 65 vendors reported a detection at scan time.
The linked report covers the scanned payload. The published file differs from it only in this readme. View report on VirusTotal.
Disclaimer
Pine Script DevKit is a software development tool for writing and maintaining Pine Script code. It does not provide investment advice, trading advice, or personalized financial recommendations, and it does not assess your financial circumstances, objectives, or risk tolerance.
Diagnostics, code actions, documentation, and AI integrations are provided for development and educational purposes only and may be incomplete or inaccurate. You are solely responsible for reviewing, testing, and backtesting any Pine Script code in TradingView before relying on it. Trading involves risk, including possible loss of capital; past and backtested performance does not guarantee future results.
This is an independent project, not affiliated with, endorsed by, or sponsored by TradingView. Provided under the MIT License; the warranty disclaimer and limitation of liability in the LICENSE file apply to the maximum extent permitted by law. Bundled third-party components and their licences are listed in THIRD-PARTY-NOTICES.md, which ships with the extension.