Futures trading mechanics

Futures backtesting: check fills, costs and account rules

A profitable historical summary can conceal ambiguous fills or a rule breach. Review the assumptions and sequence behind the total.

By Boxcar Trading4 min read

A backtest applies rules to historical data

Futures backtesting calculates how specified trading rules would have behaved on historical data under chosen assumptions about signals, fills and costs. Its result describes that model. It does not establish the fills, profit or payout eligibility an account would actually have achieved.

A glass candlestick tile beside blue and amber price paths and a brass inspection lens on a navy test bench.

Keep three kinds of evidence separate: a historical backtest, a simulation processing incoming market data or replay, and live-market executions. NinjaTrader documents different fill models for these environments. Replaying the same period can expose a discrepancy, but a simulated fill still does not prove that a live order would have filled.

Sources: NinjaTrader: historical, simulated and live fill differences

One bar can hide which exit came first

Suppose a hypothetical long position is already open at 100, with an active stop-market order at 99 and a limit target at 101. The next bar opens at 100, reaches a high of 102 and a low of 98, then closes at 100. Those four prices do not tell you which exit level was reached first.

For illustration, assume full fills exactly at the exit prices, immediate cancellation of the other exit and no costs. A path from 100 to 102 to 98 to 100 reaches the target first: +1 price unit. A path from 100 to 98 to 102 to 100 reaches the stop first: −1 price unit. Both paths fit the same bar. Actual stop fills and limit-order execution need separate assumptions.

NinjaTrader’s Standard fill resolution constructs virtual movement within a bar. High resolution uses a more granular secondary series for fill processing. More detail can reduce this ambiguity; it does not recreate live queue position. Record the fill resolution and whether limit orders may fill on a single touch.

Sources: NinjaTrader: historical fill resolution and slippage · NinjaTrader: backtest properties and commission settings · NinjaTrader: historical, simulated and live fill differences

Test whether the result survives realistic costs

Micro E-mini S&P 500 (MES) futures have a $5 multiplier and an outright tick of 0.25 points, worth $1.25 per contract. Suppose a hypothetical test makes 100 round trips of one MES contract and reports $400 gross profit before fees or slippage.

Assume an all-in commission and exchange-fee charge of $0.75 per contract per side. That is $150 for 100 round trips. One adverse tick at entry and one at exit adds 100 × 2 × $1.25 = $250 of modeled slippage. The $400 gross result becomes $0. With two adverse ticks per side, it becomes −$250. These are sensitivity assumptions, not observed results, expected slippage or Boxcar pricing.

Test whether the result survives realistic costs
Assumed adverse slippage per sideRound-trip fees, 100 tradesModeled slippage, 100 tradesResult after both costs
0 ticks$150$0$250
1 tick$150$250$0
2 ticks$150$500−$250

Sources: CME: Micro E-mini S&P 500 contract specifications

Check what the platform actually includes

In NinjaTrader’s Strategy Analyzer, Include commission controls whether commissions enter the performance result. Slippage is configured in ticks and applies to market, stop-market and market-if-touched orders; it is not a general penalty applied to every limit fill. Its historical fill logic also bounds the adjustment by the next bar’s high and low. Inspect these settings before treating a cost stress test as an execution forecast.

If fill prices already include modeled slippage, do not subtract the same slippage again. Likewise, verify whether the reported net result already includes commissions. Keep the tested contract, data provider, price type, bar interval, session template, date range, strategy version and parameters with the result. For a continuous series, also retain its roll and adjustment settings.

Sources: NinjaTrader: historical fill resolution and slippage · NinjaTrader: backtest properties and commission settings

Separate parameter selection from evaluation

Choose strategy parameters using one historical segment, then evaluate the fixed choice on a later segment that did not determine those parameters. NinjaTrader calls these the in-sample optimization period and out-of-sample test period in its walk-forward workflow.

For example, choose parameters using January through March and test them on April without retuning them after seeing April’s result. If you then change the strategy because of that result, April has informed development; reserve a later untouched period for the next evaluation. Record every version considered, not only the best result. A favorable test period is evidence about that sample, not a promise about the next one.

Sources: NinjaTrader: in-sample and out-of-sample walk-forward tests

Apply account rules to the path, not just the final profit

A trading strategy and a prop-account rule set are separate tests. Track the account balance or equity needed by each rule at each relevant point: open profit and loss, the loss floor, daily session boundaries and position limits. A profitable ending balance cannot undo a breach that would already have stopped trading.

Consider an explicitly hypothetical static loss floor of $48,000 on a $50,000 account, with touching the floor defined as a breach. One trade marks the account down to $47,900 while open and later closes at $50,500. A closed-trade summary shows a $500 gain, but the path crosses the floor first. Ending-profit data alone cannot establish that the account survived. This is a test-design example, not a Boxcar plan rule or a liquidation-price guarantee.

For a Boxcar evaluation or simulated-funded account, use the current support rules for the exact plan and stage. EOD describes when an EOD loss floor moves; it does not mean open losses are ignored until the close. A historical test is neither evaluation completion nor payout approval, and simulated-funded trading is separate from a designated live account.

Sources: Boxcar: loss floors and intraday enforcement · Boxcar: evaluation, simulated-funded and live stages