A backtest of a simple E-mini S&P 500 strategy placed a buy limit at the previous session’s low and filled it 2,322 times in 21 years. On 37 of those days, the market came down to the limit, traded at its price, and turned without trading lower. The backtest counted all 37 as fills, each one at the low of the day, and all 37 won. Those trades, 1.6% of the total, made 55% of the profit.
Every fill in a backtest is an assumption. The platform decides whether an order filled and at what price, based on built-in fill logic and its settings. On some platforms, the strategy’s code can change those settings. Our article on backtesting pitfalls lists the fill assumptions to distrust. This one looks at two ways a backtest fill can be wrong: slippage and a fill that never happens. It also gives you three checks, which show how much of a result depends on fills the market only touched, how much slippage it can absorb, and where your own orders actually fill.
Key takeaways
- By default, TradeStation and MultiCharts backtests fill a resting limit as soon as a trade reaches its price. On a bar that only touched the limit, that fill is the bar’s best price for the order: its low for a buy, its high for a sell.
- Market and stop orders can fill at a worse price than the backtest assumed, and a slippage setting can account for the average cost. A missed fill removes the trade, which no slippage setting can model.
- In the example, the 37 fills the market only touched made 55% of the profit with just 1.6% of the trades. Each was the day’s low, so none could lose before costs. On TradeStation’s data, the same comparison found 36 such fills, all of them winners.
- Find the slippage that erases the result. If it is not much larger than the market’s spread, there is little room for worse fills.
- Log each live fill against its expected price: the stop price for a stop, the last price when the strategy sent a market order. The difference is your real slippage.
Jump to: The example · Two ways a fill goes wrong · Platform settings · Three checks · Checklist
One strategy, two fill rules
The strategy: when an E-mini S&P 500 session opens above the previous session’s low, place a buy limit at that low, and exit at the session’s close. It has no parameters to tune and is not worth trading, but its fills are easy to check: every entry is a limit order at a price known in advance.
We ran it in MultiCharts from September 2005 to October 2026, one contract at a time, on back-adjusted continuous data. Daily bars came from one-minute data, one bar per session, from 17:00 Central time to 16:00 the next day. Back adjustment shifts older prices but keeps the point differences the strategy and its results rely on.
Costs were $30 per round turn: $5 commission plus two ticks of slippage on the exit. A limit order cannot fill worse than its price, so only the exit carries slippage. Two ticks, twice the E-mini’s usual one-tick spread, is a conservative slippage figure for a single contract, even though it also has to cover the exit itself: the backtest exits at the session’s last trade, a price that a market order sent just before the close may not get.
The two backtests differ in one setting: the limit-order fill assumption on the Backtesting tab of MultiCharts’ Strategy Properties. The first uses the default, which fills a limit when a trade takes place at its price or better. The second waits until the trade price goes one tick beyond the limit and still fills it at the limit price.
| Fill on a touch | Fill on a trade-through | |
|---|---|---|
| Net profit | $50,040.00 | $22,450.00 |
| Trades | 2,322 | 2,285 |
| Winning trades | 53.9% | 53.1% |
| Maximum drawdown | −$77,940.00 | −$80,435.00 |
The second backtest has 37 fewer trades. On those 37 days, the session came down to the previous session’s low, traded at that price, and never traded below it. The first backtest filled the limit every time, at the session’s low. None of those trades could lose before costs, and all 37 won after costs. Together they made $27,590, 55% of the first backtest’s profit.
TradeStation’s back-adjusted @ES data, built into the same sessions, shows the same pattern. We ran the same strategy there with its default limit fill and again with its option to fill only when the trade price exceeds the limit, with results net of the same $30 per round turn. The default added 36 fills the market only touched, all of them winners. They averaged $747.78, against $10.69 for the trades that filled under both settings.
Neither backtest shows the live result. A resting order at a price the market only touched fills if the volume traded there reaches its place in the queue, and the backtest cannot know whether it would have. This strategy’s order rests from the session’s open, so it may stand early in the queue, and many of the 37 may well have filled. The first backtest assumes all of them did, the second that none did. On fills alone, a live account would land somewhere between the two backtests.
Two ways a fill goes wrong
A backtest sees the prices that traded, not the orders that were waiting at each price. The platform’s fill assumptions decide whether and how an order fills against those prices.
Slippage on market and stop orders
Market and stop orders fill at whatever price is available when they reach the market. Slippage is the difference between that price and the one the strategy expected. Between the fill the backtest assumes and the live fill sit the spread, the time the order takes to reach the market, and the market’s move after a stop triggers. A backtest on historical bars has to assume all three. In MultiCharts, a market order sent inside a historical bar requires intrabar order generation and fills at the price of the calculation that sent it. We logged this with a test strategy that buys at a bar’s second calculation whenever the price there is above the open:
2026-03-18 | calcs 4 | open 6774.00 | order issued at calc 2, price 6814.00 | calc 3: position 1, entry price 6814.00
2026-03-19 | calcs 4 | open 6673.00 | order issued at calc 2, price 6695.00 | calc 3: position 1, entry price 6695.00
The order went out at the second calculation, at 6,814.00, and the next calculation showed a position with an entry price of 6,814.00. The fill came at the issuing price on all 61 days in the test. With Bar Magnifier set to one minute or one tick, every fill also came at the issuing price. Without finer data, a bar’s calculations are limited to its open, its two extremes, and its close. A second calculation above the open can only be the high, so every order went out and filled there.
On a historical bar, each platform chooses the fill price, and the two we tested chose different ones. In TradeStation, the same test filled every order at the next calculation’s price. Without finer data, that price was the bar’s other extreme: on all 69 days, the buy went out at the bar’s high and filled at its low, a full session’s range below the trigger. No slippage figure corrects a fill that far from the trigger, so orders sent inside a bar need finer data first. With Look-Inside-Bar Backtesting set to one tick, the next calculation is the next trade, so the fill comes at that trade’s price. These tests show which price each backtest uses, not where the order would have filled live. In live trading, the order reaches the market after the trigger price has traded and fills at the ask at that moment.
The difference between the backtest’s fill and the live one affects every market or stop order, so a slippage setting can account for its average. It is not evenly spread: a buy triggered by a rising price is sent into a rising market, a stop tends to slip more if a fast market triggers it, and one the market gaps past fills on the far side of the gap. Stress-test stop exits separately rather than trusting one flat figure.
Slippage can be modeled in several ways. A fixed number of ticks for each order type, as in the example, works when slippage varies little from one order to the next. Bid and ask history, where available, can replace the spread estimate. MultiCharts, for example, can fill buy market and stop orders from an ask series, and sell market and stop orders from a bid series. A slippage setting still has to cover the execution delay and the market’s move after a stop triggers.
Slippage can also vary with the time of day, for hours when the spread widens. For the fast markets in which stops slip more, it can vary with a volatility measure such as the average true range. If your platform accepts only a single slippage value, apply variable slippage to the trade list instead. For a strategy that trades a fixed size, run the backtest without slippage, then subtract each trade’s slippage from its result. An order large enough to move the market needs a model of its own price impact.
Missed fills on limit orders
On a first-in, first-out exchange order book, such as the E-mini’s at CME, a resting limit order joins the queue at its price and fills only when the orders ahead of it have traded or been canceled. When the market trades through the limit, every bid at that price has been filled or canceled, so a buy limit that was still working filled, and the market has moved past it. When the market only touches the limit and turns, the orders at that price may or may not all have traded, and the backtest cannot know whether yours did.
In the example, the guaranteed fills are the ones where the market kept going against the order: the second backtest’s 2,285 trades won 53.1% of the time and averaged $9.82. Every trade that lost before costs was one of them. The fills in doubt are the best entries their bars offered.
For a trade to exit at a worse price than its entry, the market has to go beyond the limit price, and by then every order resting there has filled, yours included. If the queue keeps you out, the market turned your way without you. In live trading, an order that stays in the market can miss winning trades this way, but never a losing one. Exits work the same way: a profit target the market reaches without trading through may never fill, while a stop the market reaches always does. A backtest that fills every limit the market touches can therefore only overstate the result, unless a missed fill changes which trades come next.
A missed fill cannot be priced like slippage. It does not make a trade a little worse. It removes the trade.
Fill and slippage settings by platform
TradeStation fills a limit by default as soon as a trade occurs at its price or better. Its Strategy Properties let you fill a limit only when the trade price exceeds it, or only after a set number of contracts or trades at the limit price or better, which approximates queue position. Which of the two is available depends on the symbol’s “For Volume, use” setting. In our tests, its per-contract slippage cost was charged on limit entries as well as market exits, and a separate slippage setting for market orders worsened the fill prices of market and stop orders. Commission and slippage default to zero.
MultiCharts has the same limit-fill default. Its orders can execute at any price within a bar’s range, so a limit fills at its price or better and a stop at its price or worse. The Backtesting tab lets you fill a limit only when the trade price goes beyond it by a set number of ticks, the setting behind the second backtest above. Commission and slippage default to zero. In our test, its slippage setting was charged on market exits but not on limit entries.
NinjaTrader fills a limit by default only once price has penetrated it. Its IsFillLimitOnTouch property switches to fills on a touch, and its Slippage property is set in ticks. With Order Fill Resolution set to High, it fills historical orders from a finer series than the chart’s. Since the setting works only in single-series strategies, a multi-series strategy can add a one-tick series in its code and submit its orders to that series instead.
TradingView’s broker emulator treats any price within a bar’s range as a valid fill for pending orders, and backtest_fill_limits_assumption sets how many ticks the price must move beyond a limit before it fills. Its default is 0, and slippage and commission default to zero as well. A market order fills by default at the open of the following bar. With use_bar_magnifier, the emulator fills historical orders from a lower timeframe’s prices. On both NinjaTrader and TradingView, these settings can be written into the strategy’s code.
In the MetaTrader 5 Strategy Tester, the delay setting ranges from none, which fills orders at their requested prices, to fixed or random delays. For pending orders, it delays only their placement. The tester’s “Every tick based on real ticks” mode uses ticks recorded by the broker instead of simulated ones.
Three checks that test the fill assumptions
1. Find the fills the market only touched
For a buy limit, look for entries at the exact low of a bar that opened above the limit. For a sell limit, look for entries at the exact high of a bar that opened below it. On intraday bars, a fill is in doubt only if the market never traded through the limit while the order was working. Count those fills and add up their results. Then rerun the backtest with fills only on a trade-through, using the platform’s limit-fill setting if it has one. In the example, 37 of 2,322 trades, or 1.6%, made $27,590 of the $50,040 profit. A result that relies on fills like these depends on where the order would have stood in the queue, and TradeStation’s option to fill only after a set number of contracts at the limit can show how much.
2. Find the slippage that erases the result
Add slippage, one tick at a time, to the orders that can slip (in this example, the market exit) until the net profit reaches zero. Then compare that number with the market’s spread and with the slippage your own orders get. In the MultiCharts backtests, the trade-through version’s trades averaged $9.82, about 0.8 of a tick beyond the two already charged. One more tick on the exit turned its $22,450 into a loss of $6,112.50. The touch version still made $21,015 with one more tick and lost $8,010 with two. That one tick cost $29,025, more than the 37 fills in doubt made. On TradeStation’s data, the trade-through version’s trades averaged $10.69, and one more tick on the exit left a loss of $4,115. A break-even that close leaves little room for fills worse than the backtest assumed.
3. Measure your own fills
Log each fill’s price and time against its expected price: for a stop, the stop price; for a market order, the last price when the strategy sent it. The difference is your slippage, which can differ by order type and time of day. For resting limits, also log every touch that did not fill. These numbers replace the guesses in the first two checks. Our article on strategies that won’t place orders shows how to log every attempt, not just the fills.
Before you trade it
- The backtest charges your actual commission and a conservative slippage figure
- In the backtest, market and stop orders carry slippage, and stop exits have been stress-tested separately
- Fills at the exact low or high of their bar have been counted, and the result survives a rerun with trade-through fills only
- The slippage that erases the result has been worked out and compared with the market’s spread
- The strategy is set up to log every live fill against its expected price, and every touch that did not fill
The common thread
A backtest fill is simulated. The platform’s fill assumptions decide whether a trade exists and what it costs, and they come from its built-in fill logic, its settings, or a few lines of the strategy’s code. So test those assumptions: make the fills worse, take away the ones that were never guaranteed, and see what is left.
These checks, run on your own strategy, are part of our AI code review and strategy validation service.
Frequently asked questions
How much slippage should I use in a backtest?
As much as your own orders get, measured and split by order type. Until you have those numbers, find the slippage that erases the result and compare it with the market’s spread. A figure taken from elsewhere describes other traders’ orders, so err on the conservative side. A limit order needs no slippage on its entry, but it needs a rerun with trade-through fills only, because its risk is the fill that never comes.
Do limit orders have slippage?
Not past their price, because a limit fills at its price or better. Their cost is the fills they do not get, and as the example shows, the least certain fills can be a limit strategy’s best trades. A backtest that fills every touch can overstate a limit strategy in a way no slippage setting corrects.
Does tick data make backtest fills realistic?
It fixes the path inside each bar: which price traded first, and whether a stop or a target was reached first. It does not show where your order would have stood in the queue or how long it would have taken to arrive, so a touch is still a touch. Bid and ask history adds the spread for market and stop orders. Your own logged fills show what the queue and the delay cost you.
This post is for educational purposes and is not trading advice. The strategy in it is an illustration, and its results are hypothetical. See our risk disclaimer for the full statement on simulated performance.