Aside from the known benefits, expert advisors have a big disadvantage – they act strictly within their inherent algorithm. As a result, even profitable advisors eventually lose stability. At this stage, the intervention of the trader is required, who can test and optimize the parameters of the EA.
Optimization of the advisor normally means the selection of its values at which it is able to consistently generate profit for a long time (optimization of the 2nd kind). There is another definition of optimization, which involves the search for optimal criteria of the deal making and the selection of the set of rules for position maintenance (optimization of the 1st kind).
Optimization of expert advisors of the 1st kind can’t be carried out without human intervention, as this would require the creation of artificial intelligence, noninferior to the human potential. This is why in most cases the optimization reduces to selecting efficient parameters of the EA. To do so, the built-in MT4 strategy tester is used.
Expert advisor optimization: how to start
Optimization of the 2nd kind is a simple backtesting with different parameters of the advisor. In order to avoid manually launching the testing every time, the strategy tester provides an opportunity to set the boundary value of the variable parameter and the interval at which it must be changing. At the end you will just need to select the appropriate option.
To start the optimization in the strategy tester, you need to go to the EA properties, the tab “Input parameters”, and specify a range in which the EA parameters will be changing. A change interval and the threshold value (column “stop”) must be specified. As for the limit values of the individual parameters of the trading robot, they are assigned based on the common sense. For example, it is not advisable to increase the working lot several times or SL and TP order sizes.
Before launching the testing, you need to check the “optimization” box. After the testing is complete, the tab “optimization results” will display the basic parameters for the different EA settings. As a rule, the option that showed the largest profit is chosen.
EA optimization: results analysis and reliability evaluation
Optimization of expert advisor has to give a long-term effect, as the advisor should show acceptable results at a small deviation from the optimal solution as well. Often a trader gets into the zone of the local extreme: based on historical data, the parameters are selected that provide the best return but poor stability.
To avoid this, it is recommended to test several parameters. Trading terminal allows to display the optimization results in a two-dimensional coordinate system, thanks to which the best solution can be identified.
Optimization of expert advisors using a large number of parameters increases the complexity of the process and the likelihood of the results adjusting to the history. So, 4-5 optimized parameters can be considered the maximum allowable number. In most cases, 2-3 parameters are enough for optimization.
As for the reliability of the results, the best option is to check the expert advisor with the new parameters in the market area that wasn’t involved in the optimization. In theory, trading robot should show a profitable, stable trading with small deviations from the results obtained during the optimization.
Social button for Joomla