Run your first backtest
A backtest replays your complete strategy — entries, exits and costs — over years of one market's history and reports every trade it would have opened and closed. This guide is the setup form, choice by choice, and then how to read the result without reading more into it than it says.
Before you start: is this the right test?
A backtest answers "what would this whole strategy have done". If what you actually want to know is "do my entries move any differently from a random moment", that is the entry check, and it is worth running first — because a backtest that loses can lose for two different reasons, and only the entry check tells you which.
The setup form
- The strategy, and one market. A backtest runs on a single instrument, because the costs and the history are that instrument's. Pick several and you get a group: one run per market over the history they share, each at its own typical costs.
- Costs. The spread box starts at the typical retail spread for that market — in pips on a currency pair, in basis points on metals and crypto — and the page shows you what that converts to. Change it to your own broker's figure. Costs are part of the simulation, not a line subtracted afterwards, and a strategy that comes out ahead before costs and behind after them is the most common way a backtest misleads.
- The exit. A stop and a target, each as a multiple of ATR or as a percentage of price. ATR is the default because a fixed percentage means a different trade on a quiet day and a violent one; the ATR guide explains why. You can add a time limit, let the stop trail, move it to break-even after a set gain, or close on a condition of its own. An exit you will reuse can be saved under a name.
- Positions open at once. How many trades the simulation may hold at the same time. One at a time is how most people trade a setup; more lets every entry open a trade.
- How far back. The standard depth, or deeper where the market's history allows. The form prices each depth in testing credits before you press Run.
Reading the result
The first line to read is the window it actually covered. The run reports the span it had data for rather than implying more, because eight months and eight years are not the same evidence. Then the trade count: a strategy that produced nine trades has told you almost nothing, whatever the figures underneath say.
Below that, the equity curve, the trade list, and how trades closed — at the stop, at the target, on the time limit, on a condition. The exit reasons are often the most useful part. A strategy whose trades mostly end at the stop and a strategy whose trades mostly end on the time limit are failing in different ways, and the fix is different for each.
The setup line at the top of the result records every choice above — the spread, the exit, the depth — so a result you look at in three months still says what it measured.
What to do next
- If it looks good, try to break it. "Check these settings" on the result opens a parameter search centred on the settings it ran with. If the result only holds at exactly those numbers, it was fitted to this history, not to the market.
- If it looks bad, find out why. Run the entry check. If the entries moved no differently from a random moment, no exit will rescue them. If they did move, the exit is what gave it back, and that is a much easier thing to change.
What a backtest is evidence of
What this strategy would have done, on this market, over this window, at the costs you set. That is all. Backtested results do not indicate future results, and a strategy adjusted until the backtest looks good is usually adjusted to that history. Treat a good result as a reason to keep testing, not as a forecast.