MT4 enables traders to test Expert Advisors prior to using them in a live market. This allows traders to evaluate the Expert's efficiency and to confirm that it operates as expected.
MT4's "Tester" is a multifunctional window where traders can test trading strategies (objective rules for trade entry, exit and management) and also optimize an Expert's parameters to find the combination of variables that will produce the most favorable results. To open the Tester window:
Any of these actions will open the Tester window at the bottom of the MT4 screen, as shown in Figure 21.
|Figure 21 - The Tester window appears at the bottom of the MT4 screen.|
Initially, only the Settings and Journal tabs are seen in the Tester window. The other tabs will appear as certain actions are taken; for example, the Results tab appears only after an Expert has been tested. The Tester window tabs include:
Setting up Testing Parameters
To test an Expert Advisor, click on the Settings tab in the Tester window. Here, the trader will have to select the:
o Open prices only - the fastest method suitable for Expert Advisors that control bar opening.
o Control points - results are considered estimates only.
o Every tick - the most accurate method of modeling. Since this method involves a large amount of tick data, it is typically slow and can bog down the computer's operation.
|Figure 22 -A status bar appears at the bottom of the Tester window.|
Setting up Optimization
MT4 can automatically create consecutive passes of the same Expert, with different inputs on the same data. Performing this optimization can help traders determine the inputs that have the most favorable results. To set up an optimization, traders must specify which variables will be optimized by clicking on the "Expert properties" button in the Tester window. This opens a new window with three tabs, as shown in Figure 23:
|Figure 23 - Set the Testing, Inputs and Optimization parameters to perform an optimization.|
After making the desired selections, click "OK" to close the window. Be sure the box next to the Optimization field on the Tester window is checked (to enable optimization), and click "Start" to begin the optimization. Optimizations take varying amounts of time depending on the type of data on which the optimization is performed and the complexity of the inputs. In general, multi-variable optimizations - those that test multiple levels of multiple variables - take the longest.
The Optimization Results tab in the Tester window contains a final report of each pass of the optimization. All data are presented in a table with the following fields, shown in Figure 24:
|Figure 24 - Optimization results by pass; the inputs used to create the results of each pass appear in the Inputs column on the far right.|
Click any header (such as Profit) to sort data by that field. Right-click the Optimization Results and select "Save as Report" to save a copy of the results.
Automated trading and strategy testing/optimization are advanced features of the MetaTrader 4 platform. Automated trading is popular because it removes some of the emotion from trading, helps traders avoid costly order-entry mistakes, and responds quickly to changing market conditions. The ability to test and optimize a trading idea (Expert Advisor) prior to placing it in a live market with real money is an invaluable step in the development of a profitable trading system.
[Explore Investopedia's top forex broker reviews and find a broker that matches your needs.]