Everything you need to know about backtesting: The Proper configuration of MT4

Everything you need to know about backtesting – The Proper configuration of MT4

We could easily think that backtesting in MT4 is a very simple process: We just need to open the strategy tester, set the time period of the test, and a few minutes later we will get the performance of our EA.

But the question is: will we get reliable test results?

The simplest way of checking the result of the backtest is to run an EA for a month on a real account, and when the month is over, backtest it with the same settings and compare the two results.
With this method, we can decide if the backtest results are reliable or not.
However, I suppose if we hadn’t changed any settings in MT4, the results will be far from each other…

What does the backtest result depend on?

For a better understanding of the whole problem, let’s imagine the following example:
Let’s suppose we finished a great trading year, and now we have enough money to make our dream come true: We buy a BMW 320 and enter an amateur rally championship.
In order to have chance at winning, we need to modify our new car a little:
We need to calibrate the suspension system, we need to build in roll bars, we need to fine-tune the electronic control unit, and we need to fuel up our car with racing gasoline.

We need to do the same process with MT4 if we want to get reliable test results, but
– instead of calibrating the suspension system before the tournament, we need to set the Strategy tester before the test,
– instead of remapping the electronic control unit in our car, we need to modify the historical data loading system of the MT4,
– and finally instead of fueling racing gasoline, we will load good quality historical tick data into our platform.

How to set the MT4 Strategy Tester

Or how to set the suspension system

Model Type:

When we start the strategy tester we can select three different modelling settings: “Open prices”, “Control points”, and “Every tick”.

It is a basic rule, that if we want to get to know the performance of our strategy we need to choose the “Every tick” model. Most of the time there is no sense in using the other two options.

What is “Tick”?

Tick is when the current price makes a little step up or down. The server of the broker sends the new price as a tick to our platform. E.g.: If the price goes up from 100 to 101, we say a new tick has arrived.

Why is it so important to simulate in the “Every Tick” model?

Most strategies use some kind of indicator, trailing stop, position building, or grid system. In these strategies not only the closing price of the position matters, but the route of the price before it hits the closing level as well.

The essence of the “control point” model is to leave out some ticks from the simulation to accelerate the process.

The simplest way to imagine this process is when you think of a soldier who wants to get across a mine field. If he steps on a mine he dies immediately. It is like when the price triggers our stop-loss. So when he prepares for the crossing, all the mines need to be shown on his map.


Similarly it is very important for the backtest to contain all the ticks. If we leave out even one tick from our backtest that triggers our stop, we will get a completely false result.

Likewise the missing ticks can influence the signals of the indicators. Furthermore it is possible that the price reaches our stop-loss and take-profit level in the same candlestick. In this case it is very important to know if the stop-loss or the take-profit was triggered first. Therefore we can’t miss any tick.

We recommend testing using the “Every Tick” model. In spite of this, if someone wants to choose the faster way, and use “control point” simulation, he should run two tests: One in the “control point”, and one in the “every tick” model, and then he needs to compare the two results.

The mine field example not only shows the difference between the “Every tick” and the “control point” model, but it is also a good illustration of when the historical data has quality problems. (We will talk about this later.)

The use of the “Open prices only” model only makes sense if our strategy doesn’t use any market-placed stop, or grid system, and we open and close positions only in the first ticket of a new candlestick.

Setting the Spread size

Lot of strategies fail during live trading, even though they provide very good results during backtesting. The reason could be the improper setting of the spread. You can find more info on the importance of the spread ebbenhere. We need to set a little bit bigger spread size in testing than the average spread during live trading.
If we set the drop-box to “Current” value, then the tester will check the current market spread when it starts the simulation, and it will calculate the test with this value. If possible, we should avoid using this setting, because on the weekends and in the evenings the spread could be much higher than the average, and we could destroy the performance our EA.
It is also possible that running the expert with the same settings but at different times, gives different results. The reason for the change can also be the “current” setting: The current spread was different during the two test periods, and this affected the performance of our program.

Forex Broker Stars gives us a great tool to determine the average spread.
FBS-spread-report Register in our system and you can check the change in the spread of different broker companies.
In the next article we will discuss about historical tick data: We will show you why is it important to use good quality historical tick data, how you can download it, and how you can install it into your MT4.

1 Comment

  1. June 19, 2016 - Reply

    […] to install historical tick data? Continue reading, and you will get to know everything… In our previous post we showed the proper settings of MT4, we introduced the use of the Strategy Tester, and we came up […]

Drop a comment

Your email address will not be published. Required fields are marked *

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.