How to Prepare MT4 for EA Testing and Optimization

image thumbHello everyone!

If you are going to optimize an EA properly, and even more so if you plan to do regular testing of forex expert advisors in general, then first of all you need to take care of preparing a full-fledged terminal for testing. To run tests, of course, high-quality historical data is very important, and it must first be loaded into the terminal. And for testing and optimization to run faster, it needs to be configured correctly.

And that is exactly what we will do today.

So What Does It Mean to "Configure the Terminal Correctly"?

The main purpose of a terminal for testing and optimization, strange as it may sound, is testing and optimization itself. Surely many of you have seen how production cars are prepared for racing. First, everything unnecessary is thrown out to reduce weight, and only then is fine-tuning carried out. Besides, such cars are not driven on public roads. Moreover, vehicles of this kind are tailored to a specific specialization, because it would be rather foolish to take part in drag racing in a car built for drifting, right? The same applies to a terminal for testing.

First, no trading is done on it, and almost all the time it will remain offline - it will not connect to the server at all. This is done mainly to prevent mixing quotes of different quality, from different account types, from different time periods, and from different sources.

Second, the terminal needs to be lightened. With each new version, the MetaTrader 4 terminal becomes heavier and more demanding on system resources. And if a trader uses the built-in strategy tester in the terminal for testing indicators and trading experts, then the weight of MT4 can reach dozens of gigabytes, severely slowing down its performance while carrying no functional load at all. Therefore, you need to ruthlessly clean the terminal of all unnecessary information: logs, indicators, EAs, scripts, emails, history - all of it goes into the trash bin.

Third, it is necessary to resolve the issue of the terminal's specialization.

And fourth, of course, from time to time it is necessary to perform maintenance and a general cleanup of the terminal, update quotes, clean out outdated files, and so on.

The Process of Proper Terminal Setup

Achieving and maintaining this state of terminal "readiness" is ensured by consistently completing three stages:
1) installing a separate terminal and doing its general "cleanup" before preparing it for testing;
2) defining the "specialization", the main testing parameters of the future "proving ground", as well as the history database for the instrument of interest;
3) importing quote history and shielding the terminal from outside influence.

You will also periodically have to update quotes and remove the files accumulated during work, say once a month or even less often. If you do not meet all these requirements, you may mislead yourself and, after getting "grail" test results, lose money on a real account. By carrying out the terminal preparation procedure listed above once and periodically keeping it in an up-to-date working condition, during subsequent EA testing you will not only save your effort, nerves, and time, but most importantly, you will turn the optimization process from a useless activity into productive research that allows you to obtain a fairly reliable assessment of the expert advisor's potential and capabilities.

Installing a Separate Terminal and Cleaning It Up

We are used to launching the MT4 terminal through the icon on the computer desktop. Many do not even think about what it consists of. Fortunately, on the site pages you can find lessons explaining in detail how to install an EA in the MT4 terminal and the MT5 terminal, or how to install an indicator in MT4 and MT5. In the video lesson I will examine the structure of terminal folders in more detail, and at the same time we will find out which files are needed for what and which ones can be removed from the terminal before testing.

Deciding on the Terminal's Specialization

For me, each terminal for testing is prepared for a specific task. First, let us install the terminal and think about its specialization. You can take the terminal from the website of any broker you use; I will use the Alpari terminal. Lately I have focused on researching long-term strategies, so I set aside a separate terminal for testing on periods from D1 and higher. I usually write the rest of my EAs with M1 candle close control and operation on periods from M15 minimum, and I do not use tick pipsers or scalpers. Therefore, I will not dwell on a terminal for testing EAs by ticks, because the basic principles there are exactly the same. I use a separate terminal for all major pairs, a separate one for minors and all exotics, a separate one for metals and cryptocurrencies, and a couple of separate terminals for CFD. A total of 6 terminals.

Conclusion

In the video lesson I explained in detail the entire process of preparing a terminal for testing. The only thing we did not discuss was how to install tick quote history, but this has already been written about in this, this and this article. We also did not touch on the topic of testing and optimizing EAs on historical data itself, since you can also find suitable articles on the blog pages. Now, with quality quote history available, you can easily organize your own laboratory for studying, testing, optimizing, and using the trading experts you like on real accounts with higher quality and greater speed.

Sincerely, Dmitry aka Silentspec TradeLikeaPro.ru

MT4 testing terminal setup for EA optimization: prepare a separate MetaTrader 4 terminal, import quality history, and keep testing fast and clean.