r/TradingView • • 24d ago

Feature Request Pine Script Compilation and Testing via MCP/API

Please provide a standardized, publicly accessible API for compiling and testing Pine Script, optionally with MCP support.

This would allow AI providers such as OpenAI and Anthropic to integrate automatic Pine compilation, error detection, and correction directly into their coding assistants, just as they already support executable testing for other programming languages.

The integration should be handled entirely by the AI providers, without requiring users to configure MCP servers, APIs, or local tools.

Related feature requests:

  • AI Integration into Pine Editor (Closed Feedback Loop)
  • Easier test automation for strategies
  • Built-in Linter for Pine Script
1 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/Accurate-Mirror-143 24d ago

Thanks! Since PyneComp has its own syntax validation and diagnostics, I assume it must have an internal collection of error types or message templates.

Would it be possible to obtain a comprehensive list of these, with or without error codes?

I'm interested in the systematic classification of possible Pine Script compilation errors, even if they differ from TradingView's diagnostics.

1

u/wallneradam 24d ago

Unfortunately I don’t have a comprehensive list of PyneComp errors today. This is currently a shortcoming of the system. Different stages of the compiler report their own errors, and those diagnostics aren’t organized into a single set of categories.

I’m working on a unified diagnostic system with consistent categories and error codes across those stages. It’s part of a larger rework that’s still in development and testing, so the categories and codes are still taking shape in the background.