
Pine Script Strategy Audit
io.github.tylerscomic-labv1.0.0Updated Oct 2, 2026
Static analysis for Pine Script v6 strategies — catches backtest-vs-live divergence traps.
Overview
Statically audits Pine Script v6 trading strategies for traps that compile cleanly but diverge between backtest and live trading.
- What it does
- Exposes a single tool, audit_pine_strategy, that runs a full static-analysis pass over a submitted Pine Script v6 strategy and returns each trap it finds with the specific line and a plain-English explanation. It targets fill-timing assumptions, ATR-smoothing mismatches, lookahead bias from calls such as request.security(), VWAP-anchoring drift, exit-drift tied to calc_on_every_tick and bar-close assumptions, and v6-specific syntax footguns. It is part of a wider suite of prop-firm and quant-validation tools.
- When to use it
- Use it before deploying or trusting a Pine Script v6 strategy whose backtest looks good, to surface silent backtest-versus-live divergence risks. It suits algo traders and quant validators reviewing strategies for prop-firm or live trading.
- Requirements
- A remote streamable HTTP endpoint; no authentication, environment variables, or headers are declared. A self-host option is described that requires Node.js and running the server locally. The hosted option is described as having a free tier and a paid Pro tier.
Installation
In SourceWeft
- Open Pine Script Strategy Audit in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Other MCP clients
Add this to your client's mcpServers config.
{
"mcpServers": {
"pinescript-audit-mcp": {
"type": "http",
"url": "https://pinescript-audit-mcp.mcpize.run/mcp"
}
}
}README
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.
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_tickand 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:
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
Source: README.md at commit d8e8ea0
Tools
0Version history
1- v1.0.0LatestOct 2, 2026


