How to Use the MT4 Strategy Tester

BY TIOmarkets

|June 10, 2026

The Strategy Tester is a built-in tool in MetaTrader 4 that lets you run a trading strategy against historical data. It is primarily used to backtest Expert Advisors (EAs), but custom indicators can also be loaded in for visualisation against historical prices. The tester is single-threaded in MT4, which means tests run on one CPU core at a time.

This guide explains what the Strategy Tester does, how to open it, how to configure a test (symbol, period, model, dates, spread, visual mode), how to read the output tabs after a run, and the practical limitations of backtesting. A brief note on the MT5 equivalent is included.

What the Strategy Tester Does

The Strategy Tester runs an Expert Advisor or custom indicator against a historical price series, simulating how the algorithm would have behaved if it had been live during that period. The output is a set of statistics, a chart of the resulting equity curve, and a list of every simulated trade.

For an EA, the tester places, manages, and closes simulated positions according to the EA's logic, using historical bars and tick data. For a custom indicator, the tester plays the indicator forward over historical data, mainly as a way to visualise how it would have plotted.

Backtesting is useful for understanding how a strategy has historically behaved, comparing different parameter sets, and identifying basic logic errors. It is not a forecast. Past performance is not indicative of future results.

How to Open the Strategy Tester

There are three standard ways to open the Strategy Tester in MT4.

From the menu bar: go to View > Strategy Tester.

Using the keyboard shortcut: press Ctrl+R.

From the toolbar: click the Strategy Tester button if the Standard toolbar is visible. The button looks like a small graph with a play symbol.

The Strategy Tester opens as a panel at the bottom of the platform. You can resize it by dragging the divider line.

Configuring a Test

The Strategy Tester panel has the following configuration fields.

Test type: select Expert Advisor or Custom Indicator. The dropdown next to the selection lists the installed items of the chosen type. Expert Advisors live in the MQL4/Experts folder; custom indicators in MQL4/Indicators.

Symbol: the instrument to test on. The dropdown lists all available symbols.

Period: the chart timeframe for the test. All nine MT4 timeframes are available: M1, M5, M15, M30, H1, H4, D1, W1, MN1.

Spread: the spread used during the simulation, expressed in points. Options include Current (the live spread when the test starts) or a specific value (such as 10 for 10 points, equivalent to 1 pip on 5-digit forex pricing).

Model: the price-data resolution used for the simulation. The three options are:

  • Every tick: the highest accuracy, slowest to run, using tick-level data where available.
  • Control points: middle ground, using the closest timeframe's data to model intra-bar movement.
  • Open prices only: the fastest mode, using only the open price of each bar. Less accurate because intra-bar price movement is not modelled.

Use date: when ticked, the From and To date pickers become active. The test will only cover the selected date range. When unticked, the test uses all available history.

Visual mode: when ticked, the test is replayed visually on a chart, with every simulated trade appearing as it happens. The replay speed slider next to the checkbox controls how fast the visual replay runs.

Optimization: when ticked, the tester runs multiple passes with different parameter values to find the best-performing settings. This is described in more detail in the Optimization section below.

Expert properties: this button opens the Expert Properties dialog (for EA tests), where you set initial deposit, currency, position direction allowed, and the EA's input parameters.

Symbol properties: this button shows the contract specifications for the selected symbol, similar to the Specification dialog accessible from the Market Watch.

Start: begins the test. The button becomes Stop while the test is running.

Running the Test

After configuring, click Start. The test runs in the background. The status bar at the bottom of the Strategy Tester shows progress and tick counts.

For tests with Visual mode disabled, the test completes as quickly as the CPU can process the data. Larger date ranges and finer models (Every tick) take longer.

For tests with Visual mode enabled, the simulation plays out visually on a chart. The pause and step buttons let you control the replay manually.

When the test finishes (or is stopped), the output appears across several tabs at the bottom of the Strategy Tester.

Reading the Output

The Strategy Tester output has several tabs.

Settings: shows the configuration used for the test (symbol, period, model, dates, etc.). Useful for confirming what was actually tested.

Results: a row-by-row list of every simulated trade. Each row shows the trade number, the time, the type (buy/sell, open/close), the order details, profit/loss, and the running balance. Useful for inspecting individual trade behaviour.

Graph: a visual chart of the equity curve and balance curve over the test period. The shape of the curve gives a quick visual sense of the strategy's behaviour: smooth uptrend, choppy growth, large drawdowns, and so on.

Report: a one-page summary of the test results. This is the most important tab for evaluating a strategy. The key statistics include Total net profit, Gross profit, Gross loss, Profit factor (gross profit divided by gross loss), Expected payoff (average result per trade), Absolute drawdown, Maximal drawdown, Total trades, Profit trades (with percentage), Loss trades (with percentage), Largest profit trade, Largest loss trade, Average profit trade, Average loss trade, Maximum consecutive wins, Maximum consecutive losses, and the modelling quality.

Modelling quality: a percentage shown in the report. 90% is the highest, indicating complete tick data was available for the test period. 25% is typical when Open prices only is used. "n/a" indicates that data quality was too low for a reliable test.

Journal: events recorded during the test, including any errors, warnings, or messages emitted by the EA itself. Always check the Journal for issues, especially if the test produced unexpected results.

Optimization

When the Optimization checkbox is ticked, the Strategy Tester runs multiple passes through the historical data, each with different values for the EA's input parameters, looking for the combination that produces the best results.

To configure optimization, click Expert Properties and open the Optimization tab. For each input parameter you want to optimise, set Start, Step, and Stop values. The tester will iterate through every combination.

After optimization runs, an additional tab labelled Optimization Results appears, listing every pass with its key statistics (profit, profit factor, drawdown). You can sort by any column to find the best-performing combinations.

Optimization is computationally heavy. A single optimization run on a multi-parameter EA over a multi-year date range can take hours.

A general note: over-optimised parameters that look excellent in backtest often perform poorly in live trading because they have been fitted too closely to historical data. This is called curve-fitting and is a well-known limitation of optimisation runs.

Modelling Quality and Historical Data

The accuracy of any backtest depends on the quality of the historical data fed into it. MT4 stores history data in the platform's data folder, downloadable via Tools > History Center.

Default MT4 builds typically have only M1 (one-minute) and higher timeframe data. Tick-level history is more limited and may need to be sourced separately for high-quality Every tick tests.

The Report tab shows the modelling quality figure prominently. Treat tests with low modelling quality (below 90%) as approximations rather than precise simulations.

Strategy Tester on MT5

MetaTrader 5 has a more advanced strategy tester. The MT5 version is multi-threaded (uses multiple CPU cores), supports multi-currency testing (one EA across several symbols), and uses real tick data when available. MT4 EAs are not directly compatible with the MT5 tester, since the platforms use different scripting languages (MQL4 vs MQL5).

For extensive optimization or multi-currency testing, the MT5 strategy tester is generally better suited to the workload.

Practical Considerations and Limitations

Backtesting has well-known limitations.

Past performance does not guarantee future results. A strategy that backtests well over one period can fail in live markets because conditions change.

Spread in backtests is modelled, not real. Even when set to Current, the spread used during the test is a static figure or a basic model, not the variable spread that occurs in live markets.

Slippage in real markets is not represented in backtest results. Orders that would slip several pips in fast-moving live markets will execute at the requested price in the backtest.

Visual mode is much slower than non-visual mode. Use it for diagnostic runs but disable it for production tests.

Historical data quality varies. Always check the modelling quality figure in the report.

The MT4 tester is single-threaded, so long optimization runs occupy one CPU core fully for the duration. Other platform activity can be slowed during optimization.

Custom indicators tested in the Strategy Tester are mainly used for visualisation. They do not produce a meaningful "performance" report in the way EA tests do.

Trading at TIOmarkets

TIOmarkets offers MetaTrader 4 and MetaTrader 5 on desktop, web, and mobile, across four account types. The Standard account is created automatically on registration with a minimum deposit of $20 or currency equivalent. The Raw and VIP Black accounts are opened separately through the client area. The Nano account is MT5 only with a $20 minimum deposit, USD only. Hedging is supported on all accounts. A swap-free Islamic account is available; contact TIOmarkets for eligibility and instrument requirements. Copy trading is available on both MT4 and MT5.

Orders are executed at the best available market price, which may result in positive or negative slippage. Demo accounts often execute instantly and may not fully replicate live slippage conditions. Spreads are variable and are typically higher than minimum figures shown. Leverage on each instrument is subject to change depending on market conditions and applicable regulatory requirements.

Inline Question Image

FAQ

  • What is the MT4 Strategy Tester used for?

  • How do I open the Strategy Tester in MT4?

  • What are the three model types in the MT4 Strategy Tester?

  • What does modelling quality mean in the MT4 backtest report?

  • Can I optimise EA parameters in the Strategy Tester?

Risk disclaimer: CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money. Never deposit more than you are prepared to lose. Professional client’s losses can exceed their deposit. Please see our risk warning policy and seek independent professional advice if you do not fully understand. This information is not directed or intended for distribution to or use by residents of certain countries/jurisdictions including, but not limited to, USA & Countries included in the OFAC sanction list. The Company holds the right to alter the aforementioned list of countries at its own discretion.

TIOmarkets offers an exclusively execution-only service. The views expressed are for information purposes only. None of the content provided constitutes any form of investment advice. The comments are made available purely for educational and marketing purposes and do NOT constitute advice or investment recommendation (and should not be considered as such) and do not in any way constitute an invitation to acquire any financial instrument or product. TIOmarkets and its affiliates and consultants are not liable for any damages that may be caused by individual comments or statements by TIOmarkets analysis and assumes no liability with respect to the completeness and correctness of the content presented. The investor is solely responsible for the risk of his/her investment decisions. The analyses and comments presented do not include any consideration of your personal investment objectives, financial circumstances, or needs. The content has not been prepared in accordance with any legal requirements for financial analysis and must, therefore, be viewed by the reader as marketing information. TIOmarkets prohibits duplication or publication without explicit approval.

Join us on social media

Social Media
Social Media
Social Media
Social Media
Social Media
Social Media
Social Media
Social Media
Authors BIO
TIOmarkets
TIOmarkets

Behind every blog post lies the combined experience of the people working at TIOmarkets. We are a team of dedicated industry professionals and financial markets enthusiasts committed to providing you with trading education and financial markets commentary. Our goal is to help empower you with the knowledge you need to trade in the markets effectively.