A backtest is a model, and every result shows its assumptions, so you know what went into each number.
The four lines
- Spread. Ticks taken off every entry, and every exit made at market, against the trade. The spread is the gap between the price to buy and the price to sell.
- Market-entry slippage. Extra ticks on market entries. A market entry is priced at the first price shown after your signal, not the one that fired it. Limit fills do not slip.
- Stop penetration. How far past the stop a stop fill is priced.
- Signal-to-fill latency. The delay, in milliseconds, between your signal and your fill. It shortens the time a limit entry has to fill.
Where a run set no value, Wildflower's own figure applied, and the line says so.
The rule that matters most
A waiting entry order fills as soon as price reaches its level. A limit order never fills worse than its limit price. Most take-profit targets only count when price trades through them, not when it just touches them, because a target waits in a queue at its price.
A stop is the exception. Reaching a stop sends a market order, so a candle that only touches your stop still counts as a stop-out. Leaving that loss out would make the backtest look better than it should. Both tests are decided in whole ticks. When the answer is unclear, the backtest takes the less favourable side.
A stop does not fill at its price, and your size allows for it
A stop becomes a market order, so it fills where the market is. For some instruments, Wildflower keeps an average of how far past the stop a fill lands, in dollars per contract.
Where there is one, two things follow, in backtests and live:
- Your size allows for it. That amount is added to what one contract risks before your budget is divided into contracts. So your maximum risk holds on an ordinary stop-out, not only on a perfect one.
- Comparisons allow for it. The same amount is charged against every simulated stop exit. It sits on its own line beside the broker fees, in dollars per contract.
A single stop can still fill worse than the average and land over your limit.
Some figures are estimates, and the result says so. For an instrument with no figure, nothing is added or charged, and the result says that too.
Where a waiting order fills
A waiting limit order fills at its own price, whichever candle your strategy reads its signals from.
A waiting stop order fills at its price plus one tick for crossing the spread. If a candle opened beyond it, it fills at that candle's opening price. Where the price history has the individual trades, it fills at the first trade past its price.
A cancel made at a candle's close happens at that close, so a price reached in the seconds before it still fills the order, as at your broker.
A moved stop starts at the candle's close
A stop that moves (to breakeven, a trail, or by your plan) moves after the candle closes, in backtests and live, so earlier prices in that candle cannot fill it. If the close is past it, the trade closes at market.
An exit at market is priced like an entry at market
Some trades close at market rather than by their stop or target: the smart exit, a time cap, the daily close, your firm's close time, and a moved stop the price is already past. These are priced at the close of the candle that decided the exit, less the spread and the market-entry slippage.
Scaling out counts as two fills
If your strategy takes part of a trade off at a first target, the result records both fills. The exit price shown is where the rest of the trade finished, and the money from both is added together.
What's next
Which order fires first in the same candle, waiting orders, and gaps in the price history: