How does backtesting on MT4 work? - A beginner’s guide

Backtesting in trading is a method of evaluating a certain strategy by applying it to the historical market data. It basically indicates whether the given strategy would be successful in the past, which then gives traders and analysts confidence to actually incorporate that strategy in present.
To perform strategy backtesting on MetaTrader 4, you first need to enable that feature from the View sub-menu. After that, the Tester window will appear down at the bottom. This window will contain two main elements - Expert Advisor and indicator. This means that you can do backtesting on these two elements, although, there are also ways of backtesting manual strategies.
To perform backtesting on either of these elements, you need to have them installed on the platform first. Once installed, you can choose a specific EA/indicator to run the tests on. After that, you have to choose the instrument you want to backtest: EUR/USD, USD/JPY, etc, as well as the time period next to the Symbol menu.
Next up, you need to choose the modeling method: Every tick, Control points, or Open prices only. As the software itself recommends, the tick model is the most precise way of backtesting your EA strategy. As for spreads, you can either choose the current one or specific pips.
Once that’s done, you can press the Start button and let the system do its job. Based on the timeframe and the strength of your processor, the results in the next section should appear in a few seconds or minutes.

Start Trading in 10 Minutes

Apply everything you’ve learnt on a real trading account with up to 1:777 leverage, negative balance protection and outstanding support.
Get Started

Backtesting - MT4 strategy tester

When traders enter the market, whether it’s Forex, stocks, or anything else, they employ a certain trading strategy that is ultimately designed to increase their profitable outcomes. While they cannot test their strategies in real life - otherwise it will probably end in severe financial implications, - traders use a method called backtesting.
With backtesting, they can test out the effectiveness of their strategies by applying them to the historical market data. Basically, if the backtesting works and the simulation results in a payout - that is, if it would do that for the historical data, - the traders/analysts may have the confidence to use that strategy in the actual trade. Yet if the simulation brings the loss, it may mean that the strategy may be unsuccessful in real trading as well.
Of course, this is all speculation and should be considered carefully. However, the popularity of backtesting indicates that to some extent, this method actually works.
MT4 strategy tester

Prerequisites of backtesting on MetaTrader 4

When it comes to backtesting your trading strategies on MT4, there are few things you need to do first. Initially, you need to enable this feature in the terminal. You can do that by going to the View menu at the top-right corner of the screen and selecting the Strategy Tester feature.
After that, the respective window will appear at the lower part of the window. That’s where the whole process of MT4 backtesting takes place. As for the actual testing elements, you can use Expert Advisors and indicators for the automatic backtesting.
However, those aren’t the only testable elements in MT4. Traders with a bit more experience with MetaTrader 4 can also backtest their own strategies manually, although it is more complicated than automatic backtesting. For the sake of simplicity, we’ll focus on backtesting Expert Advisors on MT4.
Another initial step traders need to take is to download the appropriate historical data for the specific instrument. More often than not, MT4 doesn’t offer the price historical data to the full extent, which can cause inefficiencies in the backtesting.
You can download the data by heading over to the Tools menu and selecting History Center. There, you need to select the appropriate symbol and double press it. It will bring out various timeframes that you’ll be able to import to your system. At the end of it, MT4 will have enough data to conduct backtesting on your instrument.

How to backtest on MetaTrader 4?

Now, let’s talk about how you can actually start backtesting your automatic trading strategies on MT4. When the Strategy Tester window appears, it will show various buttons and drop-down menus for different elements.

How to backtest on MetaTrader 4

First things first, you need to choose Expert Advisor as a testable element and select a specific EA program. Of course, you can also choose MT4 backtesting indicators on that same menu but as noted earlier, we’ll focus on EA backtesting.  You can create your own Expert Advisor, as well as download the already-created one from the internet.
After that, you have to choose your preferred trading symbol which, usually, will be a Forex pair because MT4 is quite limited in its trading instruments. The number of available instruments in the collapsing menu depends on your symbols selected in the Market Watch window.

MT4 backtesting tutorial

The next step is to select the appropriate time frame, as well as the Model of backtesting. There will usually be 7 different timeframes and three Models: Every tick, Control points, or Open prices only. MT4 itself suggests that the Every tick option is the most accurate method based on all available timeframes, therefore, we’ll also choose this option.
When it comes to the Spreads menu, you can either choose the current option or six different points (2, 5, 10, 30, 50, or 100 pips). Again, for the highest accuracy, it is generally a good idea to choose the current option.
The Expert properties button will take you to the window where you can choose the initial deposit, the currency of your deposit, the type of position (long/short/both), etc. This is the area where you can provide more specific details about your preferred position.

Getting the results

After that, the only remaining step you need to take is to press the Start button and initiate the MetaTrader 4 backtesting. The results will be displayed in the Results tab of the Tester window in a few seconds or minutes, depending on the timeframe you selected, as well as the computing power of your desktop device.
Those results will include simplistic data about the total net payout, as well as loss, the number of positions with positive/negative outcomes, and many more. In short, traders can get pretty comprehensive information about whether their strategy would actually work in the past. This, in turn, would help them decide whether to use that strategy in real life or not.

Start Trading in 10 Minutes

Apply everything you’ve learnt on a real trading account with up to 1:777 leverage, negative balance protection and outstanding support.
Get Started

MT4 backtesting tutorial - Key takeaways

Using a method called backtesting, traders can examine the effectiveness of their trading strategies. If a certain strategy brings virtual payouts for the historical market conditions, traders will get the impression that the same strategy could actually work in real life.
When it comes to conducting backtesting on MetaTrader 4, there are certain precautions traders have to take beforehand. For example, they have to download appropriate historical data for their specific instrument. This data will be used for testing out the trading strategy.
After the precautions, traders will have to choose a specific element they want to backtest. In our guide, we focused on backtesting Expert Advisors. In the same Strategy Testing window, they also need to choose their trading symbols, backtesting model, as well as a timeframe and specific spread amount.

Finally, traders will have to enter the amount they want to trade and start backtesting on MT4. The outcome of this process will be visible in the Results tab, where traders will be able to see whether their strategy would have been successful in the past or not.

FAQ on how to perform backtesting on MetaTrader 4

Why do traders use backtesting MT4?

Backtesting is predominantly used in order to determine the effectiveness of the given trading strategy. While traders cannot do that in real life, the ability to simulate certain positions on past economic data can help them achieve more or less the same effect.

So, if the backtesting results show that the current trading strategy would bring payouts in the past, this would give traders more incentive to use that same strategy in real life.

But if the results were negative, meaning the results produced losses, traders would be more discouraged from using that strategy in real life. Of course, these conclusions are still speculative as predicting market conditions at 100% is pretty much impossible.

Which elements can traders use to backtest on MetaTrader 4?

There are various elements that can be backtested on MT4. On stock, the software offers two elements - Expert Advisors and indicators - that are available for automatic backtesting. 

While we provided information about the EA backtesting, this method also works for indicators pretty much the same way. After entering all the necessary prerequisites, the software will backtest the indicators automatically.

But this doesn’t mean that traders cannot test out their own strategies manually. They can certainly do that, but it will take more time and includes a lot more steps than the automatic backtesting. 

What steps do I need to take before running the MT4 strategy tester?

Before jumping right into backtesting a trading strategy, you need to make sure you have taken several steps. First things first, you need to enable the Strategy Tester feature in MT4. You can do that by heading to the View menu and selecting the feature.

After that, you need to have appropriate historical data for your specific trading symbol. Usually, MetaTrader 4 doesn’t offer full market data for every instrument, which means backtesting won’t be as accurate as it should be.

To avoid that, you may manually download data to your platform. But it’s not as complicated as it sounds: you can go to the Tools menu and select History Center. There, you need to choose your own symbol, double-click it, and once the appropriate data is visible, import it to the system. These two steps will give you the basic playground for backtesting your trading strategies.

Axiory uses cookies to improve your browsing experience. You can click Accept or continue browsing to consent to cookies usage. Please read our Cookie Policy to learn more.