Testing of Trading Strategies in MetaTrader 4
Your Expert Advisor has been written. It is at this point that a very important stage begins: the expert must be
debugged and optimized for the market to earn profits.
Testing on historical data is an essential prerequisite for a profitable automated trading system to be created. Every trader knows that manual testing of the
Expert Advisor is a quite labour-intensive and long process. This is why many traders use special software tools for testing.
A visual strategy tester is now embedded in the MetaTrader® 4 Client Terminal
along with the MQL4™ programming language. Testing and optimization of experts is not a
Our first strategy tester appeared in the online trading platform MetaQuotes as far back as 2002. Since then we have gained much experience: created two new
online trading platforms MetaTrader 3 and MetaTrader 4, developed a brand-new strategy tester, embedded genetic optimizer and visual testing into it.
Flexible test settings
Any optimizable parameter of the expert - balance, profit factor, maximal drawdown - and any timeframe (if historical data is available) can be tested.
Reports about testing results
For better and quicker analysis of experts' test and optimization results, different kinds of reports are embedded in the strategy tester. The graphic display
of test results demonstrates balance changes during expert testing. It is always possible to analyze each specific trade separately, if necessary.
Besides, a combined report is generated after each test. It includes a mass of statistical data about testing parameters and trading activities of the expert.
Any desired parameters, starting with the quality of the modeled history and finishing with the expected profit in the next trade (mathematical expectation), can
be found there.
The possibility to monitor tester work by logs from journal is provided, as well.
Visualization of strategy testing
Visualization allows monitoring of the expert testing process. One can see directly in the chart
how the automated trading system trades. All this makes it possible to implement advanced standards in testing of Expert Advisors and to analyze the expert's
behavior more precisely.
Use of genetic algorithms in testing
The idea of genetic algorithms was borrowed from animate nature and consists in artificial
construction of the evolutionary process. The ultimate goal of this process is to find optimal solution for a complicated problem. Genetic algorithms enable
quick and effective search of a huge amount of combinations during expert optimization.
Use of genetic algorithms saves optimization time for automated trading systems by hundreds or even thousands of t
Different modes of bars modeling
For testing to be precise, tick data is required. But it is often impossible to get tick-by-tick history for a sequence of years. Traders, as a rule, have
only one-minute data available. This is why there are
three modes of bars modeling available in the strategy tester.
The choice of the bars modeling mode essentially influences the adequacy of the expert test and optimization results. Thus, one can quickly test the expert
using the fastest mode of modeling on historical data. However, the testing error can be rather significant. At every-tick modeling, in fact, the large amount
of data to be processed takes much more time. But the results will be more precise and reliable.
All the above advantages of the visual strategy tester enable the trader to optimize his or her automated trading strategy to meet market requirements.
Benefit from the visual strategy tester and maximize your profits. No matter whether you are going to automate your trading system or not, it must be tested and