Installation of complete and correct data for MetaTrader
Theoretically, the download of historical data into MetaTrader is quite easy, just select F2 and download...
In practice, however, many difficulties occur causing various problems. In fact, many system developers do not even realize that the data is incorrect, as MetaTrader seems to be quite resistant with these kinds of problems.
Consequently, many back-tests turn out to be incomplete, erroneous and/or not reproducible. A prerequisite is, however, that a reliable back-test is run with perfectly correct data.
Repeatedly we are asked why one and the same back test produces diverse results just within minutes.
If you, for example, test the system Magic-Champ-II using flawed data you will obtain different results as displayed on our web page. The reason is one of the specific features of this system. Although it runs and trades within the 5min chart, it uses data out of the 5min/15min/30min/60min/240min time levels computing different entry and exit conditions. If only one time frame is missing or appears to be incomplete, the back test will be incorrect.
For that reason we will subsequently answer questions regarding the correct settings in MetaTrader as well as the right procedure how to create or optimize a complete and correct back test.
As a general rule:
Independent of your broker, the data will always be downloaded from the Metaquotes Software Corp. server. Thus, regardless whether you have an account at FXCM, FxPro or Alpari the accessed data is always the same. The only difference is the spread and the rates’ time placement due to the different time zones the servers are located in. Accordingly, there might be a delay of several hours and the candles may look differently from the 4h candle on.
Generally, the tick data is NOT downloaded. The smallest time unit is 1min being also the time frame where the open/high/low/close and volume is loaded from. It is precisely this data, from which the amount of ticks is calculated if you run a back-test. However, this calculation is only an approximation procedure representing ticks as they could have occurred but not the actual ticks from the past!
1. Close all charts in MetaTrader and afterwards MetaTrader itself!
2. Delete the existing download-data of your preferred currency pair.

3. Delete all data which MetaTrader has saved for this currency pair so far. Make sure to delete ALL time levels.

4. Restart MetaTrader. Under “options” you now set the amount of bars in the history to its maximum. If you wish you may repeat this in your chart. MetaTrader will limit the intern maximum to 2147483647 automatically.

5. Open the corresponding currency pair chart for which you would like to download the data.
6. Activate ALL time levels for the this pair successively. Either by pressing the right mouse button in the chart adjusting the periodicity, or by activating the necessary toolbar. This step is important, because this is where MetaTrader compiles the respective data structure for the time levels in the background.

7. Activate the download-menu.

8. Download the data of the currency pair by activating the superordinate level and selecting download. Do not use the subordinated level.

9. Once the download is completed, click through the time levels in ascending order.

10. Now, the history should contain all the available data from Metaquotes Software Corp.

11. In order to get reproducible back-tests you have to “freeze” the spread.
You may ask yourself why to “freeze” the spread? The answer lies in the fact that each back test you run is processed with exactly the spread which is present the second you start it. This is substantial, as back-tests would produce different results if you have, for example, an ECN-broker with flexible spreads. Hence, freeze your spread, because you do not want to run one test with 0.5 point and the other with 2.5 point spread.
This is also important for the optimization, as unless you freeze the spread, you may have a variation in the spread distorting the results.

12. Log out to avoid the download of new data as well as the corresponding spread update. Delete your password and log in again by which the server will deny you and cut the connection.

13. The connection to the broker is cut off now and you are able to run correct and reproducible back-tests with complete data and fixed spread.

Conclusion: In case you want to run back-tests on a regular basis, you should open another demo-account separately of your main one. In there you can download the data whenever needed without being connected to the broker the rest of the time.



