TradeReign
Back to HomeEducation HubCompatibilityAboutDisclosures
Futures Education

How to Backtest a Futures Trading Strategy Verify the Fills and the Result

In the fictional ten-trade MES sample below, two candles contain both the stop and the target. How the test scores those two trades changes whether the result is positive or negative.

Quick Answer

Write the entry, exit, sizing and session rules first. Record the dated contracts, data series, fees and order-fill settings. Reconcile individual trades before comparing totals, then run the frozen rules on dates you saved for validation.

Start 7-Day TrialRecord the test settingsSee how two uncertain exits change the resultCheck the holdout

Write down what the test will actually do

Record the instrument, dates, session and time zone. For a continuous futures series, write down the contract switch and adjustment settings. At a rollover, check the dated contract behind any surprising fill or signal.

Record when the signal first becomes available and when the orders can become active. A rule that needs the completed 10:00 close can make its decision at that close. Whether a simulator can fill then or models the next available price depends on the execution settings.

Set commissions per side, slippage, order size and what happens if both exits fit inside one bar. Keep those settings with the trade list so a repeat test uses the same assumptions.

See how two uncertain exits can flip a backtest

Suppose eight MES trades have a clear first exit and total $42.50 net. Two more trades each have a one-contract long from 6,000.00, a 6,004.00 target, and a 5,995.00 stop. Both exits are working before the relevant candle starts. The candle reaches both levels in each trade.

Assume $2.50 in round-trip fees and use the stated stop and target prices as fills to isolate exit order. Each uncertain trade would net $17.50 if the target came first or lose $27.50 if the stop came first. These are scenario totals under those fill assumptions. Extra slippage can change them.

One candle contains both exits

Synthetic MES 1-minute candles. Times are bar closes in ET.

Marked bars · 10:04 E / 10:15 A

Price levels · 6,004 Target / 5,995 Stop

The simulated position is long from 6,000.00 at E. Bar A, ending at 10:15, trades beyond 6,004.00 and 5,995.00 while both exits are active. Its OHLC does not establish which exit came first.

Same MES sample under three exit-order assumptions
AssumptionTradesNet P&L
Stop first in both10−$12.50
One of each10$32.50
Target first in both10$77.50

Check finer data if available. If the smallest available bar still contains both prices, keep both trades in the sample and report the uncertainty. The $42.50 from the eight clear outcomes describes only those eight trades.

Validate the frozen rules on dates you held back

Pick development and validation dates before tuning. Use the development period to write and refine the rules. Save the final recipe, then run it unchanged on the held-back dates with the same cost and fill assumptions.

For both periods, record trade count, net P&L after costs, drawdown, and the count of unresolved trades. If you use the validation results to change the rules, set aside a fresh period for the next independent check.

Find the applicable settings in TradingView’s Strategy Report or review the NinjaTrader walk-forward example.

Sources

Official References

Platform details on this page were checked against these official resources.

TradingView’s historical fill assumptionsCheck how the broker emulator infers order within a bar and when lower-timeframe data is available.CME futures expirations and rolloverReview how dated contracts change when a position rolls.
Related Guides

Keep Building the Rule System

Check the dated contracts around a futures roll

Compare an apparent jump with quotes from each actual expiry.

Reconcile fills and fees on a single futures trade

Compare a long, short and stopped-out position on annotated charts.

FAQ

Common Questions

What if a futures backtest candle hits the target and stop?

First confirm both orders were active. Check finer data for the order of the touches. If the order is still unresolved, identify the simulator’s assumption and show how other plausible exits would change the result.

Should I backtest on a continuous or dated futures contract?

A continuous chart can give you longer context. Record its switch and adjustment settings. Verify surprising signals or fills against the specific dated contracts, especially near a roll.

Risk Disclosure

Futures trading contains substantial risk and is not suitable for every investor. TradeReign is a trading-discipline and rule-enforcement application. It does not provide trading advice, trade signals, investment recommendations, or performance guarantees.

TradeReign is not a broker-dealer, futures commission merchant, or investment advisor.

Futures trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Only risk capital - money that can be lost without jeopardizing financial security or lifestyle - should be used for trading. Past performance is not necessarily indicative of future results.