Tradingview Backtest Assistant”

by vtlk

287 downloads
Not rated
GitHub

About

exposes a remote MCP endpoint so agents can: run strategy backtests by symbol/timeframe/date range, pass strategy inputs programmatically,receive structured backtest results (trades, win rate, profit, drawdown).

Details

Author
vtlk
Downloads
287
Categories
Communication, Other, Finance, AI

- Run strategy backtests by symbol, timeframe, and date range
- Pass strategy inputs programmatically
- Receive structured backtest results (trades, win rate, profit, drawdown)
- Progress notifications for long-running backtests
- Binance Futures tickers only
- Maximum 1440 candles per backtest
- Rate limit: 3 backtests per minute per user

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Tradingview Backtest Assistant”
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Connect your MCP-compatible agent to the server’s remote endpoint. The agent can then request backtests by specifying symbol, timeframe, and date range, optionally passing strategy parameters. Results are returned as structured data.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "tradingview backtest assistant\u201d": {
            "tvmcp": {
                "url": "https://backtest-engine-mcp.click/mcp/backtest",
                "headers": {
                    "Authorization": "Bearer <API_KEY>"
                }
            }
        }
    }
}

McpServers

{
    "tvmcp": {
        "url": "https://backtest-engine-mcp.click/mcp/backtest",
        "headers": {
            "Authorization": "Bearer <API_KEY>"
        }
    }
}

exposes a remote MCP endpoint so agents can: run strategy backtests by symbol/timeframe/date range, pass strategy inputs programmatically,receive structured backtest results (trades, win rate, profit, drawdown).

Backtesting engine for your AI Agent with PineScript support for TradingView usage

Production-ready MCP server for running TradingView Pine Script strategy backtests (Binance data) from AI agents.

Overview•Connect•Supported Agents•Troubleshooting•Get API Key•Website

tv-pinescript-backtest-mcpexposes a remote MCP endpoint so agents can:

- run strategy backtests by symbol/timeframe/date range,
- pass strategy inputs programmatically,
- receive structured backtest results (trades, win rate, profit, drawdown),
- keep long-running runs observable via progress notifications,
- support Binance Futures tickers only,
- enforce a maximum of 1440 candles per backtest,
- apply a rate limit of 3 backtests per minute per user,
- ask your agent to write a strategy and backtest it.

Get API key:[](https://backtest-engine-mcp.click/dashboard)<<<https://backtest-engine-mcp.click/dashboard
- Your MCP server URL (https://backtest-engine-mcp.click/mcp/backtest)
- Your API key (Bearer token)

Use HTTP transport and pass the API key inAuthorization: Bearer <API_KEY>.

claude mcp add --transport http tvmcp https://backtest-engine-mcp.click/mcp/backtest --header "Authorization: Bearer <API_KEY>"
{ "mcpServers": { "tvmcp": { "type": "http", "url": "https://backtest-engine-mcp.click/mcp/backtest", "headers": { "Authorization": "Bearer <API_KEY>" } } } }
{ "$schema": "https://opencode.ai/config.json", "mcp": { "tvmcp": { "type": "remote", "url": "https://backtest-engine-mcp.click/mcp/backtest", "oauth": false, "headers": { "Authorization": "Bearer <API_KEY>" } } } }

Add to.cursor/mcp.json(or~/.cursor/mcp.jsonglobally):

{ "mcpServers": { "tvmcp": { "url": "https://backtest-engine-mcp.click/mcp/backtest", "headers": { "Authorization": "Bearer <API_KEY>" } } } }

Note: the same MCP configuration is used bycursor-agentCLI.

Add to~/.codex/config.toml(or.codex/config.tomlin a trusted project):

[mcp_servers.tvmcp] url = "https://backtest-engine-mcp.click/mcp/backtest" http_headers = { Authorization = "Bearer <API_KEY>" }

Note: Codex CLI and IDE extension share the sameconfig.toml.

Open MCP configuration (.vscode/mcp.jsonor usermcp.json) and add:

{ "servers": { "tvmcp": { "type": "http", "url": "https://backtest-engine-mcp.click/mcp/backtest", "headers": { "Authorization": "Bearer <API_KEY>" } } } }

If needed, use Command Palette:MCP: Open User Configuration.

Optimize my strategy: <pinescript code>
Optimize my strategy from file: sma20.pine
Find a strategy on the internet and backtest it using the tvmcp backtest tool.
Backtest my strategy on BTCUSDT 1h from 2026-03-01 to 2026-03-10, Pine code: //@version...

The backtest-engine server has been tested on 30 strategies and tuned to match TradingView backtests 1:1 as closely as possible. Some operators may still be unsupported.

If you hit this case, please create a minimal strategy that reproduces the issue and submit it in Issues. We will do our best to add support quickly.

Remote MCP server for historical crypto & prediction-market data: search ~500K instruments, live market stats (OHLC, turnover, spreads, depth, slippage) and tick-data purchase. Keyless for catalog & stats; optional OAuth for account tools. Endpoint: https://cryptostruct.com/mcp

Read-only MCP server for your Evibe investment portfolio + live market data (holdings, performance, dividends, benchmarks, screeners). Works with Claude & ChatGPT.

Realtime and Historical Exchange Rate Data, FX pairs, bid/ask, OHLC and Crypto prices

US/HK markets — 110 tools: real-time quotes, options, orders, fundamentals, alerts, DCA & portfolio

Live Polymarket prediction market data — whale trades, market odds, trader profiles, leaderboards, and AI-citable summaries.

Token Metrics integration for fetching real-time crypto market data, trading signals, price predictions, and advanced analytics.

AI trading memory layer for MT5/forex with 15 MCP tools — store/recall trades, pattern discovery, strategy evolution, and Outcome-Weighted Memory.

Operate the AgentPump agent economy: read the live market and create, fund, tune, and run autonomous on-chain trading agents.

Interact with the Alpaca trading API for stock trading, account management, and market data using LLMs.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.