A backtest with real costs deducts from every trade the spread, commission, slippage and swap your broker would actually charge, instead of the zero cost or fixed spread the tester uses by default. The difference weighs more the shorter the holding time: a strategy that captures a few points per trade looks fine at zero cost and can turn negative with the real spread. The test that settles it is to run the same backtest at 1x, 2x and 3x the per-trade cost and note at which cost the result reaches zero. That break-even cost is the number to report.
The four costs every trade pays
The spread is the gap between the buy and sell price when you open: you pay it on entry, it changes with the hour and it widens on news. Commission is a fixed amount per lot or per trade that ECN brokers charge.
Slippage is the difference between the price you asked for and the price you were filled at; it appears when the market moves before the fill, especially on stops. Swap is what you pay or receive for holding a position from one day to the next.
Why zero cost flatters short-term strategies
Cost is charged per trade and the edge is measured in points per trade. A strategy that holds positions for days captures many points in each one; a scalper aiming for a few points pays the same spread for a much smaller move.
The second effect is the number of trades: the more per year, the more often you pay the cost. If the report's cost line reads zero, the result is gross, not net.
What changes at 1x, 2x and 3x
Run the backtest with the per-trade cost you estimated (1x), with double (2x) and with triple (3x). Note the net result, the maximum drawdown and the Sharpe of each run. A strategy with margin stays positive at 2x; a fragile one turns negative sooner.
The 2x and 3x runs exist because the real cost is not constant: the spread widens on news, slippage grows with volatility and the broker can change its conditions. Those runs measure how much margin you have before the cost catches up with the signal.
The break-even cost: one number to report
Look for the per-trade cost at which the net result reaches zero: interpolate between 1x, 2x and 3x, or repeat the backtest with intermediate costs until it crosses zero. That is the break-even cost, in the same unit as your cost: points, pips or account currency.
Report it next to the real cost: if the break-even cost is three times your real cost, there is room for a worse spread; if it is barely above it, the result depends on the broker changing nothing. Rigor measures this in every audit: the result at 1x, 2x and 3x and the break-even cost, tagged Measured, Declared or Not measured.
How to estimate your cost from a broker statement
Open the account history in MT5 or the broker's monthly statement and add up, over closed trades, the commission and swap columns. Divide by the number of closed trades: that is the fixed part of your cost. If commission and swap add up to 600 over 300 trades, that part is 2 per trade.
Spread and slippage sit inside the fill price. For the spread, note the gap between buy and sell during the hours your strategy trades and take the median over several days. For slippage, compare the requested price with the filled price in your order history, especially on stops. Add both to the fixed part: that is your 1x cost.
Three typical traps
A fixed spread in a variable-spread market. A fixed spread measured in quiet hours understates the cost of a strategy that trades at the open or on news. Use the historical spread if your data carries it.
No slippage on stops. The tester fills the stop loss at the exact level; in a real account it is a market order that fills where there is liquidity. With tight stops and many stop exits, the loss per trade is understated. Add slippage to every stop.
Ignoring swap on overnight positions. A strategy that holds positions for days or weeks pays swap every night, and on some instruments it adds up to more than the spread. Check that the tester's swap matches your broker's.
FAQ
Which cost do I use if I am going to trade a prop-firm challenge?
The challenge's, not your broker's: the challenge account has its own commission per lot and its own spread. Ask the firm for those conditions, run the backtest with them and compare the break-even cost against that cost. The daily-loss rules make the 2x run more relevant.
Is the spread in an MT5 backtest the real one?
It depends on the data. MT5 stores the spread per bar only when the broker delivers it; if your data came without spread, the tester uses the fixed spread you configured or the current one. The tester report states which spread it used.
Does a positive result at 3x mean the strategy is solid?
Only that the result has margin against cost. It says nothing about how many configurations were tried or how many years the history covers: with three years of daily returns and no real edge, the best of 100 configurations shows a Sharpe near 1.5 by luck alone. Rigor's calculator gives you that number with your own data, free and with no signup.