Rules first, or nothing counts
You can only backtest what is WRITTEN: exact setup conditions, exact entry trigger, exact stop and target logic, exact filters — the rules-based spec. "I would have seen that sweep" is not testable; "M15 wick below the marked level closing back above" is. Every ambiguous rule becomes, in hindsight, whatever the outcome needed it to be — the mother of all backtest lies.
The four great traps
Lookahead: using information unavailable at decision time — the classic gold version is acting on a candle's extreme before it CLOSED, or drawing zones with data from after the entry. Test bar-by-bar, decisions on closed candles only. Hindsight selection: testing only the legs you remember (which you remember BECAUSE they worked); the cure is testing every signal in a continuous window, chosen before you look. Curve-fitting: tuning parameters until history submits — ten optimised parameters can make noise profitable; every added knob must justify itself out-of-sample. Cost amnesia: gold's spread plus slippage can erase a marginal edge entirely — model them pessimistically or the live account will model them for you.
Walk-forward: the honesty machine
The cure for curve-fitting has one recipe: split the data. Design and tune on window A (say 2019-2022), then run UNTOUCHED on window B (2023-2026). The out-of-sample result is the only number that predicts anything. Stricter version: rolling walk-forward — tune on two years, test the next six months, roll forward, repeat — which also reveals whether the edge DECAYS. This site's own engine validations run exactly this discipline (it is how one popular "edge" here was exposed as a one-bar lookahead and retired). If out-of-sample collapses versus in-sample, you built a mirror.
Reading the results like an adult
Sample size first: under ~100 trades, your "60% win rate" has error bars wide enough to hide a losing system. Then the quartet: expectancy in R, maximum drawdown (can you psychologically SURVIVE the historical worst?), trade frequency (an edge that fires monthly cannot feed anyone), and stability across regimes — a system profitable only in 2024's trend is a bet on 2024 returning. Pass all four honestly and paper-trade it live-forward before real size: the market grades slightly differently than history, and tuition is cheaper in demo. Chart-replay practice on the live chart's timeframes is a fine manual-testing bench. Nothing here is financial advice.
FAQ
How many trades make a valid backtest?
A working minimum of 100 signals, ideally spanning trending AND ranging regimes; under that, variance can disguise a losing system as a winner. More data beats more parameters, always.
What is lookahead bias in backtesting?
Using information that did not exist at decision time — entering on a candle's high before it closed, or zones drawn with future data. It systematically inflates results and is the most common fake-edge generator.
My backtest is profitable — am I ready to trade it live?
Only if it survived OUT-OF-SAMPLE (walk-forward) testing with realistic costs, and its historical drawdown is one you can emotionally fund. Then paper-trade forward first: history grades easier than the live tape.
ⓘ See these ideas on real price: open the free XAUUSD live chart.