3. Back testing with Meta Trader 4 (1)

Bookmark and Share

1. What is back test?

Back test is something you do to check how your trading system would have worked using the past data. That is to try whether your program could have made either profit or loss in the past data.

In other words, this test is done with the assumption that the tendency in the future is going to be the same as that of the past. There are pros and cons about this.

There are many factors that discourage the value of back test, such as the performance limits of Meta Trader Strategy Tester (the accessory program of MetaTrader4), over fitting (having optimized too much to the data at hand that it can’t adjust to the new data), etc.

However, is there any other way to check your program? No, there isn’t.

Therefore, although back test is not the best way, it still has some utility.

2. Setting Meta Trader 4

To enhance the utility of the back test using Meta Trader Strategy Tester, it is important to increase the amount of data. Please follow the instructions to setup so that you can use the maximum amount of data.

Open up Meta Trader and select "Tools > Options"(Ctrl+O).

When the option dialog is displayed, enter a large number such as 99999999999 in ”Max bars in history” in the Charts tab.

MetaTrader Options ウィンドウ

By doing this, the amount of data covered in the back test will automatically be set to the maximum that is available in Meta Trader
(Extremely large numbers like 999999999999 will automatically be replaced to the largest number available in Meta Trader)

3. Accessing to the past data

First of all, you will need the past data of price movement to run back test.
You can get them for free (the data afterwards 2004) from FXDD:


When you click the link above, a page called "History Center for Meta Trader" will be opened.

In this page, a 1-minute period and daily data of each currency pair (EURUSD, USDJPY etc.) is provided.
Because you can recreate data of a time period of your convenience (e.g. a 5-minute period data) from a 1-minute period data. Basically, you should download the1-minute period data.

For example, let’s download a 1-minute period data for USDJPY
When you extract the downloaded data, there will be a file named ”M1_USDJPY.hst".

We will extract this file somewhere and import it to Meta Trader 4.

4. Importing the past data to Meta Trader

By now we got the data we are going to use. Now it's time to import them into Meta Trader. Please choose "Tools > History Center"(F2 key) and open History Center.

MetaTrader History Center

When a window like the image above opens, select "USDJPY > 1 Minute (M1)" from Symbols on the left.
Then click the Import button under it and you’ll have the import window opened.

Choose the file you had extracted from the “File” column, then click OK and close the window.

Before going to the next step, make sure that you RESTART Meta Trader!