How to backtest MNQ futures with real ticks in MetaTrader 5

The Strategy Tester will give you a number for any settings you choose. Whether that number means anything depends on a few choices that the tester does not make for you. This is the method we use for every MNQ backtest, and the traps we found on the way.

1. Test the dated contracts, not the continuous symbol

Many futures brokers offer a continuous symbol next to the quarterly contracts, with a name such as @MNQ or MNQ cont. It joins the contracts one after another and shifts the older prices so that the chart has no gaps. For a chart that is fine. For a backtest it is not: the shifted prices never traded, the symbol jumps by a few hundred points on the day it switches to the next contract, and the real ticks, which are not shifted, can be mixed with shifted bars. In one of our tests, stops were hit at prices that never existed, and the continuous symbol showed a small fraction of the profit that the same program made on the dated contracts over the same period.

Use the quarterly contracts instead: MNQH (March), MNQM (June), MNQU (September) and MNQZ (December), followed by the year, for example MNQZ26. Expired contracts are often still available in the broker's symbol list, sometimes in a separate folder for expired symbols.

2. Test each contract while it was the front month

MNQ contracts expire on the third Friday of their month, and trading moves to the next contract about a week earlier. We test each contract from the Friday one week before the previous contract expired to the Friday one week before its own expiration (the end date is not included, so the roll Friday belongs to the new contract). For MNQH26 that is 12 December 2025 to 13 March 2026. Then we add up the results of all contracts. Thirty contracts cover June 2019 to October 2026.

Each run starts with no open trades and ends with none, so a position is never carried from one contract to the next. On a real account, close the position yourself before you move the program to the new contract.

3. Choose "Every tick based on real ticks", then check the history quality

The tester can also work from 1-minute bars only ("1 minute OHLC") or generate every tick from those bars ("Every tick"). Generated ticks follow a fixed path inside each bar, so when a stop and a target are both inside one bar, the tester may pick the wrong one first. For a program with tight levels this changes the result: in one of our comparisons the same trades, entered at the same moments, gave a result about 16% lower on 1-minute bars than on real ticks. Use the generated models only for a quick first look, never to choose between settings.

After each run, open the report and read the History quality line in the header. 100% means that every tick came from the broker's tick history. A lower figure means that the tester generated ticks for the days that are missing. At our broker the real MNQ tick history starts in June 2019; the first six contracts show 84% to 95%, because some days after each roll have no ticks (two trading days on most, ten on MNQZ20), and every contract from MNQH21 on shows 100%. Check the figure for every contract, and treat a low one as an approximation.

4. Add the commission yourself if the tester shows none

The tester charges what the broker's settings for the symbol say. At some futures brokers, ours included, that is nothing: the commission and exchange fees appear on the daily statement, not on the trade. Look at the Commission column in the Deals list of the report. If it is zero, subtract the real cost per round turn from every trade afterwards. Take the cost from your own statements, not from a price list: ours came to about $1.95 per MNQ round turn, and we use $2.00. Run the numbers again with one tick of slippage on every entry and exit ($1.00 per round turn on MNQ) to see how much of the result depends on perfect fills.

5. Tell the program which clock the server uses

A program that trades at New York hours needs the broker's offset from UTC. In the Strategy Tester the "GMT" time a program can read simply repeats the server time, so the offset has to come from a setting or from the price history. If the program has a setting for the broker clock, set it to what your broker really uses: our broker's server runs on UTC all year. Automatic detection from the price history can be one hour off on a three-month contract in the weeks when the US and Europe change their clocks on different dates, so for backtests we set the clock by hand. Our guide on broker server time and daylight saving shows how to check it in two minutes.

6. Five traps we found in the tester

  • Trading hours frozen for the whole test. The tester applies one weekly table of trading hours to the whole run: the symbol's current one, which can be a holiday week. Orders in the missing hours are refused with "market closed" in the Journal, even though prices keep moving. Search the Journal for that message after every run. We copy each contract into a custom symbol with the correct trading hours and test on the copy.
  • Prices that never traded at the 18:00 reopen. In the first second after the daily and Sunday reopen at 18:00 New York, the tick history can hold a few quotes with the bid far above the ask, by 20 to 400 points. The tester fills orders and triggers stops on them. If your program holds positions through the daily break, or trades in the first seconds after it, check those trades by hand.
  • Memory. One quarter of MNQ real ticks needs about 10 GB of memory per test, and an optimization that starts many agents at once can run out of memory and reject the passes. Run real-tick tests one at a time, or with fewer agents.
  • The last day. The tester cannot test today, and the end date is not included: to test up to Friday, set the end date to Saturday.
  • The deposit. On a multi-year test the drawdown can exceed a small starting balance, and the test then stops as if the account were wiped out. Use a balance well above the largest drawdown you expect, for example $50,000 for one MNQ contract, and judge the result in dollars, not in percent of that balance.

7. Read the results by trading day, contract and year

A futures trading day runs from 18:00 to 17:00 New York, not from midnight to midnight on the server. Group the trades by that day before you count losing days or the largest daily loss, or a single night can be split across two days. Then look at the result per contract and per year, and remove the best day: if one event carries a large share of the profit, the backtest depends on it repeating. Our guide on how to check a backtest lists the questions to ask.

How we tested our program

Every MNQ backtest figure on our results page comes from this method: 30 dated MNQ contracts, each in its front-month period (31 test runs), real ticks, the broker clock set to UTC, $2.00 per round turn deducted, and a second scenario with slippage. The tester's own reports are on the results page, so you can check the history quality and the result of every run, and repeat the test with the free demo on your own broker's data. With the overnight trade on, the program also reads the long history of the broker's continuous contract (at AMP @ENQ): the first run downloads its ticks and can take a long time, and for the early years the continuous contract can be missing at some brokers. Our short video shows the whole method on one contract, MNQU26, with an earlier version of the program.

This guide is general information, not investment advice. Trading futures with leverage carries a high risk of loss. Backtest results are not a promise of future results. See our risk disclosure. Product names are trademarks of their owners, used only to describe the instruments.