Skip to content

Transform VS Code into a powerful Pine Script IDE with comprehensive v6 support, IntelliSense-quality completions, parameter hints, professional syntax highlighting, and rich documentation.

License

Notifications You must be signed in to change notification settings

jpantsjoha/pinescript-vscode-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

37 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pine Script v6 IDE Tools

Professional Pine Script v6 development in VS Code with IntelliSense, real-time validation, and 100% language coverage.

CI/CD Version Installs Rating License

Pine Script v6 Extension in Action Real-time validation, IntelliSense, and hover documentation for Pine Script v6

Function Signature Help Complete function signatures with parameter hints and documentation


πŸš€ Quick Start

Install from Marketplace

Search for "Pine Script v6 IDE Tools" in VS Code Extensions or install directly from marketplace

Or Install from VSIX

Download the latest .vsix from Releases and install:

code --install-extension pinescript-v6-extension-0.4.4.vsix

✨ Features

🎯 100% Pine Script v6 Coverage

  • 6,665 language constructs from official TradingView reference
  • 457+ functions with autocomplete (ta., math., str., array., etc.)
  • 31 constant namespaces (xloc, yloc, extend, scale, display, etc.)
  • 22 function namespaces with full parameter validation
  • 32 strategy. variables* (position_size, equity, netprofit, etc.)

πŸ” Real-Time Validation

  • Catches undefined functions and variables
  • Detects missing/extra parameters
  • Validates namespace properties
  • Zero false positives on valid v6 code

πŸ’‘ Intelligent IntelliSense

  • Smart autocomplete for all built-in functions
  • Parameter hints with type information
  • Hover documentation
  • Namespace-aware suggestions

πŸ“ Syntax Highlighting

  • Complete Pine Script v6 syntax support
  • Built-in variables and constants
  • Keywords, operators, and functions
  • Comments and strings

πŸ“– Usage Examples

Valid Pine Script v6 Code

//@version=6
indicator("My Indicator", overlay=true)

// All valid v6 syntax - no false positives! βœ…
length = input.int(14, "Length")
source = input.source(close, "Source")

// Technical analysis with autocomplete
sma_value = ta.sma(source, length)
ema_value = ta.ema(source, length)
rsi_value = ta.rsi(source, 14)

// Math functions with precision parameter
rounded = math.round(close, 2)  // βœ… v0.4.4+ supports precision
max_val = math.max(open, close)

// Strategy variables fully supported
if strategy.position_size > 0
    plot(strategy.equity, "Equity")
    plot(strategy.netprofit, "Net Profit")

// Plot with all v6 constants
plot(sma_value, "SMA", color=color.new(color.blue, 50), style=plot.style_line)
plot(ema_value, "EMA", color=color.new(color.red, 50), style=plot.style_linebr)

// All namespace constants work
x = xloc.bar_index
y = yloc.price
e = extend.both
s = scale.left

πŸ”§ Configuration

The extension works out of the box with zero configuration. All Pine Script v6 features are automatically recognized.


πŸ“Š What's New in v0.4.4

Fixed Parser Issues

  • βœ… math.round() now correctly accepts optional precision parameter
  • βœ… Added 32 missing strategy.* runtime variables
  • βœ… Eliminates false positives for valid strategy scripts

Before v0.4.4

rounded = math.round(close, 2)  // ❌ ERROR: Too many arguments
if strategy.position_size > 0   // ⚠️  WARNING: Unknown constant

After v0.4.4

rounded = math.round(close, 2)  // βœ… Valid
if strategy.position_size > 0   // βœ… Valid

See CHANGELOG for complete version history.


πŸ§ͺ Testing

This extension is thoroughly tested:

  • 67/67 unit tests passing (100%)
  • 7/8 example files validated
  • Parameter validation verified
  • Namespace property detection tested
npm test  # Run test suite

🀝 Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

Found a Bug?

  • Check existing issues
  • Create a new issue with:
    • Pine Script code that triggers the problem
    • Expected vs actual behavior
    • Extension version

Want to Help?

  • Report false positives/negatives
  • Suggest feature improvements
  • Submit pull requests
  • Share feedback

πŸ“š Resources


πŸ“„ License

MIT License - see LICENSE for details.


πŸ™ Acknowledgments

Created by Jaroslav Pantsjoha

Special thanks to:

  • TradingView for Pine Script
  • VS Code extension development community
  • All contributors and testers

Full Language Coverage: 6,665 Pine Script v6 constructs Test Coverage: 67 comprehensive tests Current Version: 0.4.4

About

Transform VS Code into a powerful Pine Script IDE with comprehensive v6 support, IntelliSense-quality completions, parameter hints, professional syntax highlighting, and rich documentation.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •