Optimization of the "Constructor MT5" EA

Optimization of the "Constructor MT5" EA

2 сентября 2022, 01:10
Aliaksandr Chupryna
0
111

                    Let's consider an example of "Constructor MT5" Expert Advisor optimization                                      

   ACT 1   

We will optimize each block (EA) separately. 

Opt_1

It is necessary to disable all characters except the first one.

Opt_2

   ACT 2   

Turn on the optimization mode.

Opt_3

To reduce the optimization time, we will limit the results we need to the drawdown. To do this, set Auto_Lot=true, Deposit=2000, BalanceForAdd=200.

Opt_4

   ACT 3   

       We turn on the parameters to be optimized and set their ranges:       

1- Parameters of the condition for opening a position (and entry deals within the position)

Opt_5

2 - Deal volume calculation parameter

Opt_6

3 - Position closing condition parameter

Opt_7

   ACT 4   

Be sure to set Exponent_Symbol=1

Opt_8

We look at the number of test options

Opt_9

Choose an optimization option. Option 1( Slow complete algorithm) will show us all the results (which is desirable). But if the number of testing options is very large, then option 2( Fast genetic based algorithm) can be chosen. Run the optimization.

Opt_10

   ACT 5   

From the optimization results, select one of them and start testing.

Opt_11

Opt_12

Now we switch to the "Auto_Lot = false".

Opt_13

We get a result that suits us.

Opt_14

   ACT 6   

Now let's find out which symbols' volatility is suitable for trading according to the selected parameters. To do this, turn on the "All symbols selected in MarketWatch" optimization mode.

Opt_15

You need to include "Only_1_Symbol=true". Without this, the tester will not be able to iterate through the symbols from the MarketWatch. And start the optimization.

Opt_16

   ACT 7   

From the results obtained, we sequentially select the appropriate symbols.

Opt_17

Write selected symbols to input parameters

Opt_19

Set "Only_1_Symbol=false" and start testing EA-1

Opt_18

Get the result

Opt_20

Don't forget to save in "file.set" .

Opt_21

   ACT 8   

We repeat the same steps for EA-2, EA-3 and EA-4.

Opt_22

Opt_23

Opt_24

   ACT 9   

For each EA we get the results

Opt_25

We see that the drawdown of CC2 is 2 times greater and therefore we can multiply "Exponent_Symbol"(1, 3 and 4) by 2

Opt_26

Enable all EA and test

Opt_27

   ACT 10   

You can stop there, or you can accelerate the dynamics of profit growth. Enable Auto_Lot=true . Let's take a deposit of 5000. BalanceForAdd=5000 (every 5000 the lot will increase by 0.01)

Opt_28

Result

Opt_29





Файлы: