Pine Script DevKit for VS Code

Full-featured Pine Script v6 IDE support for Visual Studio Code. The complete toolset for writing TradingView indicators, strategies and libraries without leaving your editor.
566+ built-in symbols · IntelliSense · hover docs · real-time diagnostics · formatter · AI chat · themes
Note: This is not an official TradingView extension. It is an open-source tool built by our team and shared with the community. All code produced compiles in TradingView without errors.
Features
Syntax Highlighting & Themes
Rich semantic highlighting for keywords, namespaces (ta., math., array.…), built-in types, operators, and annotations. Includes two purpose-built color themes:
- Pine Script Dark optimised for TradingView's dark UI
- Pine Script Light clean light variant
Custom .pine file icon in the Explorer (dark and light variants).
IntelliSense & Hover Docs
Namespace-aware autocompletion for 566+ Pine Script v6 functions, constants and variables sourced directly from the TradingView reference.
- Type
ta. to see every technical-analysis function with signatures and docs
- Hover any built-in symbol to get a rich tooltip with parameter table and a direct link to the TradingView Reference Manual
- Signature hints while typing function arguments
- Semantic Highlighting colors user-defined functions, variables, types and parameters distinctly from built-ins
Real-time Diagnostics
Squiggly lines catch Pine Script mistakes as you type:
| Diagnostic |
Severity |
Missing //@version=6 declaration |
Warning |
Missing overlay= parameter on indicator() |
Warning |
request.security() inside a for/while loop |
Error |
plot() call inside an if block |
Warning |
Navigation
| Shortcut |
Action |
F12 |
Go to Definition. Jumps to user-defined symbols and opens TradingView docs for built-ins |
Shift+F12 |
Find All References. All usages of a symbol in the file |
F2 |
Rename Symbol. Renames user-defined symbols across the file |
- Document Outline shows functions, variables, UDTs and inputs in breadcrumbs and the Outline panel
- Code Lens shows usage count above every user-defined function
- Smart Folding for function bodies,
type blocks and // #region markers
- Document Highlight highlights all occurrences of the symbol under cursor in real time
- 25+ Snippets covering indicator/strategy/library scaffolds, TA patterns, control flow, drawing objects and tables
- File Templates create new Indicator, Strategy or Library files via Command Palette or Explorer context menu
- Auto-Formatter normalizes 4-space indentation, trims trailing whitespace and collapses excess blank lines
- Color Picker inline picker for
color.rgb() and all color.* named constants
- Code Actions quick fixes to add
//@version=6, add overlay=, or wrap a block with barstate.isconfirmed
- Clickable Links TradingView URLs in comments become hyperlinks
Pine Script Explorer
A dedicated Activity Bar sidebar that lists all built-in namespaces and their symbols. Click any entry to insert it at the cursor position.
@pinescript Chat
An AI chat participant in GitHub Copilot Chat. Ask anything about Pine Script v6:
@pinescript how do I draw a horizontal line at the highest high of the last 20 bars?
@pinescript /explain (explain selected code)
@pinescript /indicator (generate a new indicator scaffold)
@pinescript /strategy (generate a new strategy scaffold)
Getting Started
- Install the extension. Files with the
.pine extension activate it automatically.
- Open the Getting Started walkthrough via
Help / Get Started / Pine Script.
- Create your first file via
Cmd+Alt+I on Mac or Ctrl+Alt+I on Windows and Linux.
Keyboard Shortcuts
| Shortcut |
Action |
Cmd+Alt+I / Ctrl+Alt+I |
New Indicator |
Cmd+Alt+S / Ctrl+Alt+S |
New Strategy |
F12 |
Go to Definition |
Shift+F12 |
Find All References |
F2 |
Rename Symbol |
Requirements
VS Code 1.120.0 or higher. No other dependencies.
Extension Settings
| Setting |
Default |
Description |
pinescript.diagnostics.enable |
true |
Enable real-time diagnostics |
pinescript.diagnostics.checkRequestSecurity |
true |
Warn when request.security() is inside a loop |
pinescript.hover.showDocLinks |
true |
Show TradingView reference links in hover tooltips |
pinescript.completion.triggerOnDot |
true |
Show namespace completions after . (e.g. ta.) |
pinescript.references.enable |
true |
Enable Find All References |
pinescript.color.enable |
true |
Enable inline color picker |
pinescript.formatting.enable |
true |
Enable Format Document |