Skip to main content
Glama
tylerscomic-lab

pinescript-audit-mcp

pinescript-audit-mcp

License: MIT Live on MCPize

An MCP server that statically audits Pine Script v6 strategies for the specific traps that compile clean, backtest beautifully, and then diverge from live behavior.

The problem this solves

Pine Script strategies can compile with zero errors and still behave differently live than in the backtester — fill-timing assumptions, ATR-smoothing mismatches, lookahead bias, VWAP-anchoring drift, and exit-drift are all silent, syntactically valid patterns that the compiler has no reason to flag. This catches them before they cost real money finding out live.

Related MCP server: PineForge-Codegen

What it catches

  • Fill-timing traps — orders that backtest as filling at a price/bar the live broker can't actually match

  • ATR-smoothing mismatches — RMA vs. SMA vs. EMA smoothing assumptions that quietly change signal timing

  • Lookahead bias — request.security() and similar calls that leak future bar data into historical evaluation

  • VWAP-anchoring drift — anchor-period assumptions that behave differently on session boundaries live vs. in backtest

  • Exit-drift — exit logic that behaves differently depending on calc_on_every_tick and bar-close assumptions

  • Pine v6 syntax traps — v6-specific footguns that compile but change behavior from v5 equivalents

Tools

audit_pine_strategy

Runs the full static-analysis pass against a submitted Pine Script v6 strategy and returns every trap found, with the specific line and a plain-English explanation of the backtest-vs-live divergence it causes.

Use it

Hosted (recommended): MCPize — free tier, paid Pro tier for higher limits.

Self-host:

npm install
node server.js

Part of the AlgoForge suite

Prop-firm and quant-validation tools for algo traders: prop-rules-mcp, trade-journal-mcp, payout-calc-mcp, econ-calendar-mcp, montecarlo-validator-mcp, overfitting-audit-mcp, walkforward-validator-mcp, backtest-cost-sensitivity-mcp, pinescript-mcp.

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Provides comprehensive Pine Script v6 documentation and tools to help AI assistants look up functions, validate syntax, and generate accurate code. It enables linting, version conversion from v5 to v6, and deep conceptual analysis to prevent code hallucinations.
    10
    9
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Backtest PineScript v6 strategies locally from your AI agent: transpiles Pine to C++ and runs it on the deterministic, TradingView-validated PineForge engine via Docker. Tools for single backtests, parameter-grid sweeps, and Binance OHLCV fetch — no API key, data never leaves your machine.
    11
    56 npm
    7
    MIT
  • F
    license
    Not graded
    quality
    A
    maintenance
    Provides Pine Script v6 validation and reference lookup for coding agents, enabling them to write correct TradingView indicators with real-time diagnostics and function signatures.
    2
    -