import_tradingview_backtest
Answers "TradingView says my strategy made X - what would it have made through AlgoVesta?".
You export the strategy's trade list from TradingView and this recomputes it with
real trading costs: taker fees on entry and exit, and the slippage we actually
measure on fills. TradingView's default backtest applies neither unless the strategy
author configured them, which is why exported results are usually optimistic.
Runs in the background: the call returns a `job_ref`; read the result with
`get_job_status(job_ref)`.
Deliberate limits, always repeated in the result:
- Pine Script is NOT executed or interpreted. Only the trade list you exported is
recomputed. Entry and exit prices stay exactly as TradingView reported them.
- Funding fees are not modelled.
- Rows without a quantity column cannot have fees applied, so their figures stay
optimistic; the count of such rows is reported.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"csv_text": "<csv_text>"
},
"name": "import_tradingview_backtest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv_text | Yes | The contents of the CSV you exported from TradingView: Strategy Tester -> List of Trades -> Export. Paste the file unchanged, including its header row. The 'Performance Summary' tab is NOT accepted - it has no per-trade rows. | |
| leverage | No | Leverage to record with the run (1-125). It is metadata: the profit figures come from your export, so changing it does not rescale them. | |
| slippage_bps | No | Slippage in basis points to apply on entry AND exit (default 3 = 0.03%, the value measured on our own fills). | |
| taker_fee_bps | No | Taker fee in basis points to apply on entry AND exit (default 5 = 0.05%). |