Home/Pine Script Backtest API

Pine Script Backtest API

Run Pine Script backtests from a GPT conversation.

Create, run, and analyze compatible Pine Script v6 strategy backtests from ChatGPT with explicit data, costs, date range, and auditable execution context.

What the GPT action does

PineScript API is a Pine Script backtesting GPT powered by a dedicated execution API. Describe an idea in plain language or provide a strategy() script and the assumptions for the run. The result keeps the performance summary next to the code, market, timeframe, costs, and execution settings that produced it.

The workflow is designed for strategy research and software validation. It does not place live orders, connect to a brokerage account, or guarantee that historical performance will continue.

A complete backtest request

REQUEST TEMPLATE

Backtest this Pine Script v6 strategy on CRYPTO:BTCUSD using daily bars from 2021-01-01 through 2024-12-31. Use $10,000 initial capital, 0.10% commission, two ticks of slippage, and show the paginated completed trade history.

✓ Verified against the public dataset catalog · July 13, 2026

A specific request makes the result easier to repeat. If a setting is omitted, the result should identify the default that was used instead of leaving the assumption hidden.

Inputs kept with the run

Strategy source

The exact Pine Script v6 code and input overrides used during execution.

Market data

Exchange, symbol, chart timeframe, dataset coverage, and number of loaded bars.

Execution costs

Initial capital, commission, slippage, and any supported order-processing option.

Validation period

Start and end dates, plus warm-up data used to initialize indicators.

Outputs to review

  • Net profit, return, maximum drawdown, win rate, and Profit Factor
  • Total trades, winning and losing trades, and average result per trade
  • Equity behavior, monthly or yearly returns, and long-versus-short performance
  • Entry, exit, direction, profit or loss, and holding period for completed trades
  • Engine build, dataset ID and coverage, script SHA-256, settings SHA-256, and request fingerprint

Run the workflow

Test the script with its assumptions attached.

Bring the Pine Script, market, timeframe, costs, and date range into one GPT conversation.

Open PineScript API