# Auto backtest

> Run a graph over many markets and timeframes, preview the trades and save them.

Source: https://quantraider.com/docs/auto-backtest

An auto backtest runs one of your graphs over historical candles for several markets and timeframes, and records the trades it finds. You do not place anything by hand.

> Not financial advice. Trading involves risk of loss. Backtest results are hypothetical.

Open it from a strategy's **Auto backtest** tab. It needs a plan that includes **Automated backtesting**. If your plan does not, the app tells you and links to the plans ([Plans and billing](/docs/plans-and-billing)).

You need a graph with a trade entry, assigned to the strategy. See [Build logic with the graph editor](/docs/graph-editor).

## Set up a run

The bar at the top has these settings.

| Setting | What to choose |
|---|---|
| Graph | One of the graphs assigned to the strategy. If none exist the list says **No graphs found**. |
| Markets | One or more markets. |
| Timeframes | One or more of 1m, 5m, 15m, 1h, 4h, 1d. |
| From, To | The date range. The start must be before the end. |

On the right it shows **Saved trades** (trades already stored for the strategy) and **Preview** (trades found by the current preview).

## Preview first

1. Choose **Simulate**. The button shows how many candles have been processed.
2. When it finishes, the app says how many trades it previewed. The preview saves nothing.
3. Below, choose a market and a timeframe under **Chart** to see the previewed trades on the chart.

If there is not enough history for an indicator to warm up, the app warns you with the number of candles available and required. Signals from under-warmed periods are excluded.

If something fails, the message ends with **No trades were saved.**

## Generate and save trades

1. After a preview, choose **Generate trades**. It is enabled only when there is a preview to save.
2. A progress line shows what happened: **Processed**, **Calculated**, **Persisted**, **Forwarded**, **Failed** and **Duplicates skipped**.
3. When it ends, the app confirms. If some trades failed it shows a warning.

Trades that were rejected are not saved and do not count in performance statistics. Choose **Failed trades** to see each one: pair and timeframe, signal time, order and entry, and the reason. This list is kept only for the current run.

Duplicates of trades you already saved are skipped.

## Delete saved trades

The trash button, **Delete all saved trades**, removes every saved trade for the strategy. You are asked to confirm: **Delete all saved trades for this strategy?** This cannot be undone. Use it, for example, after you change a graph and want to regenerate the history.

## After the run

Open the **Analysis** tab to study the saved trades. See [Analysis](/docs/analysis). To train a model on them, see [AI training](/docs/ai-training).
