Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Pine Script DevKitNew to Visual Studio Code? Get it now.
Pine Script DevKit

Pine Script DevKit

Chereshnyuk

|
284 installs
| (1) | Free
| Sponsor
Build TradingView Pine Script v6 indicators and strategies with IntelliSense, diagnostics, formatting, @pinescript Copilot chat, and MCP tools for AI agents.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Pine Script DevKit for VS Code

VirusTotal Pine Script v6 MCP

This extension brings Pine Script v6 into your VS Code workflow. Here is what it can do:

  • Create a script
  • Complete code as you type
  • Read documentation on hover
  • Catch and fix errors as you type
  • See inferred types
  • Go to definition, find references
  • Rename a symbol
  • Find any symbol
  • Pick colors
  • Use community libraries
  • Ask @pinescript in Copilot Chat
  • Give AI agents the Pine tools
  • Format a script
  • Requirements

A Relative Strength Index script in VS Code with a hover card showing the series float type of a variable in its Wilder RSI function, shown in the Dark Modern theme and then in the Light Modern theme, its Pine Script colors following the theme

Create a script

Press Ctrl+Shift+P (Cmd+Shift+P) and run "Pine Script: New Indicator" or "Pine Script: New Strategy" to open a ready-to-edit v6 template. Start a library with the library snippet, one of more than 40 snippets for common Pine patterns.

The Command Palette runs Pine Script: New Strategy and an untitled strategy template opens

Complete code as you type

Type ta., math. or strategy. to browse every built-in, and press Ctrl+Space to read its documentation. Open a parenthesis, or press Ctrl+Shift+Space (Cmd+Shift+Space), and signature help shows the parameters of the call you are writing.

Typing ta.at lists ta.atr with its documentation, then signature help shows its length parameter

Read documentation on hover

Hover a built-in to see all of its overloads and what each one returns, or press Ctrl+K Ctrl+I (Cmd+K Cmd+I) to show the same card at the cursor. Hover your own variables, types and methods to see their types and fields. Click "View in Pine Script Reference" to open the official TradingView page.

Hovering ta.highest shows both overloads and the reference link, then the card for a script variable shows its type

Catch and fix errors as you type

Mistakes are underlined as you type, from a missing //@version=6 to a series value passed where Pine needs a simple one. Press Ctrl+Shift+M (Cmd+Shift+M) to list them in the Problems panel, and click the light bulb or press Ctrl+. (Cmd+.) to apply a quick fix.

A series length passed to ta.ema is underlined, listed in Problems and fixed with a quick fix

See inferred types

Turn on pinescript.inlayHints.enable to see the qualifier Pine infers for a variable, such as series, next to its name. Edit the code and the hints follow.

An inlay hint changes from simple to series when the value it describes starts to depend on price

Go to definition, find references

Press F12 on a function, type, method or variable to jump to its declaration. Press Shift+F12 to see every place where it is used.

F12 jumps from a method call to its declaration, then Shift+F12 lists the references of a type

Rename a symbol

Press F2 on a symbol, type the new name and press Enter. Every reference in the script is updated at once.

F2 renames a variable and every reference to it changes

Find any symbol

Press Ctrl+Shift+O (Cmd+Shift+O) to jump to a type, method, function or input in the current script, or Ctrl+T (Cmd+T) to find a symbol in any open .pine file. The Outline view lists the same symbols.

Go to Symbol jumps to a method in the current script, then Go to Symbol in Workspace opens a function in another file

Pick colors

Hover the swatch next to a color constant such as color.teal, a color.rgb() call or a #RRGGBB literal to pick a new color.

Hovering the swatch of color.teal opens the color picker and a click picks a new hue

Use community libraries

Write import Author/Library/Version and the extension reads the library's source from your workspace, with completion, hover, signature help and Go to Definition for what it exports. It takes the first of:

  1. .pine-libs/Author/Library/Version.pine
  2. .pine-libs/Author/Library.pine
  3. the .pine file nearest your script that declares library("Library")

Nothing is downloaded and no library ships with the extension: copy a library's source from TradingView into one of these places. Until one is found, the import shows a hint and the rest of the script is still checked.

Typing trend. lists the exports of a library read from a workspace file, signature help shows the parameters of strength as they are filled in, and Go to Definition opens the library on strength

Ask @pinescript in Copilot Chat

Press Ctrl+Alt+I (Ctrl+Cmd+I) to open Copilot Chat, then type @pinescript to ask about Pine Script, or select code and use /explain. /indicator and /strategy answer with a starting script and an "Open as a new file" button. @pinescript works in a trusted workspace.

Copilot Chat explains a selected Pine Script method through @pinescript /explain

Give AI agents the Pine tools

Switch Copilot Chat to Agent mode, and tools such as #lookupBuiltin, #getDiagnostics and #suggestFix let the agent check its code against the Pine v6 reference and this extension's diagnostics. Run "Pine Script: Generate Agents Guidance (AGENTS.md)" to write a managed Pine section into your workspace's AGENTS.md; the command needs a trusted workspace.

Other agents in VS Code desktop find the same tools on the pine-script-devkit MCP server.

The Agent mode tool picker lists the Pine Script DevKit tools and the pine-script-devkit MCP server

Format a script

Press Shift+Alt+F to run Format Document: it turns tabs into four spaces, trims trailing whitespace and collapses runs of blank lines. Use Format Selection to format only the selected lines.

Format Document turns the tab indentation of a pasted RSI script into spaces, trims its trailing whitespace and collapses a run of blank lines

Requirements

This extension works with VS Code 1.138.0 or higher. Chat and Agent mode need GitHub Copilot.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft