# Manual backtesting

> Replay historical candles, place trades by hand and draw on the chart.

Source: https://quantraider.com/docs/manual-backtesting

Manual backtesting replays historical candles one at a time. You decide when to take a trade, as you would live, but on past data. Each trade you submit is saved for the strategy and shows up in [Analysis](/docs/analysis).

> Not financial advice. Trading involves risk of loss. Hindsight is not available live, and a replay cannot reproduce every real-world condition.

Open it from a strategy's **Backtest** tab. While it connects, the page says **Connecting to backtest server…**.

## The screen

- **Top bar**: the market selector, the replay start date and the **Take trade** button.
- **Chart**: candles, with timeframe buttons above them.
- **Left toolbar**: drawing tools, **Logic graph** and **Layout**.
- **Bottom bar**: replay controls.

## Choose a market and a start date

1. Pick a market in the selector at the top left.
2. Choose the date button (it shows the current replay date). In **Select replay start date**, set the month, year and time.

The replay starts at that moment. You only see candles up to it.

## Move through time

| Control | What it does |
|---|---|
| Previous candle | Steps back one candle. |
| Play or Pause (Space) | Plays candles forward, or pauses. |
| Next candle (Right arrow) | Steps forward one candle. |
| Next trade | Advances as fast as possible until the logic graph triggers a trade. Shown only when a logic graph is selected. |
| 1x, 2x, 5x | Replay speed. |
| Close backtest | Leaves the backtest. |

Click the timeframe buttons above the chart to change timeframe: **1m**, **5m**, **15m**, **1H**, **4H**, **1D**. The **Trades** button shows or hides trades that are already saved for the strategy. **Spreads** shows saved spread estimates as grey lines, when spread data exists.

## Place a trade

1. Replay to the candle where you want to enter.
2. Choose **Take trade**.
3. Lines appear on the chart.
   - A white **Entry** line, set at the latest price.
   - An **SL** line for the stop loss, and one line for each stop loss defined on the strategy.
   - One line for each take profit defined on the strategy.
   - One line for each price point defined on the strategy.
4. Drag the lines to the prices you want. The price shows in each label.
5. Choose **Apply trade** to submit it, or **Cancel** to remove the lines.
6. If the strategy has indicators, **Indicator values** opens. Enter a number or pick an option for each one, then choose **Confirm**. A node-based indicator says it is configured in the graph editor.

A message says **Trade submitted**.

You need enough candles loaded to place a trade. If not, the app says **Not enough candle data**. If the chart is still loading it says **Chart not ready yet**.

Stop losses, take profits, price points and indicators come from the strategy's **Edit** tab. See [The strategy workspace and its tabs](/docs/strategy-workspace).

## Use a logic graph

A logic graph shows what your graph computes while you replay.

1. Choose **Logic graph** in the left toolbar.
2. Pick a graph in **Select logic graph**. If the list says **No graphs found for this strategy**, assign a graph on the Edit tab first.
3. A panel appears below the chart, headed **Logic graph** with the graph's name. Drag its top edge to resize it. Choose **Close logic graph** to hide it.

Visualize nodes in the graph draw lines, histograms and arrows on the chart. See [Node reference](/docs/graph-nodes).

## Drawing tools

The left toolbar has these tools.

| Group | Tools |
|---|---|
| Lines | Trend line, Ray, Arrow, Extended line, Horizontal line, Horizontal ray, Vertical line, Cross line, Callout |
| Shapes | Rectangle, Circle, Triangle, Path, Parallel channel |
| Draw | Brush, Highlighter, Text |
| Analysis | Fibonacci retracement, Price range, Long/short position |

Choose a tool, then click on the chart. Select a drawing to open the **Drawing style** bar. It has **Colour**, **Line width**, **Line style** (Solid, Dotted, Dashed or Large dash) and **Delete drawing**.

## Several charts

**Layout** opens a grid of layouts, from one chart up to eight panels. Each panel has its own timeframe. **Sync drawings** copies drawings between panels. **Sync crosshair** moves the crosshair on all panels together. Click a panel to make it the active one.
