Optimization of the "Oberon Bars MT5" EA

Optimization of the "Oberon Bars MT5" EA

26 августа 2022, 13:21
Aliaksandr Chupryna
0
121

Expert Advisor "Oberon Bars MT5"

                                                       EXAMPLE OF EA OPTIMIZATION                                                           

         ACT 1   

      We will optimize each block separately. Disable all characters except the first.

      Opt__1

         ACT 2   

      Turn on the optimization mode.

      Opt2_1

      To reduce the optimization time, we will limit the results we need to a drawdown (about 200) . To do this, put Auto_Lot=true, Deposit=2000, BalanceForAdd=200. As a result, only those testing results will remain in which, with Auto_Lot=false, the maximum drawdown will be about BalanceForAdd or less.  Necessarily  Exponent_Symbol=1. Set optimization parameters.

      Opt__2

         ACT 3   

      We look at the number of test options.

      Opt__3

      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_4

         ACT 4   

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

      Opt__5

      Opt__6

         ACT 5   

      Now we switch to the "Auto_Lot = false".

      Opt__7

      We get a result that suits us.

      Opt__8

      Opt__9

         ACT 6   

      Since the maximum drawdown is 2.5 times less than planned, we can increase Exponent_Symbol by 2 times.

      Opt_10

      Let's get the result.

      Opt__11

         ACT 7   

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

      Opt__Set

         ACT 8   

      Then we repeat the same actions with other currency pairs. You can check each time their joint work.

      Opt__12

         ACT 9   

      After optimizing all symbols, we finally test all blocks together ("Trade=true" for all symbols). We see the result that reflects the essence of the adviser - the profit is summed up, but the drawdown has not changed much. To do this, when choosing optimization results, you should try to choose results with an average number of deals and a small TakeProfit (so that the positions of different symbols overlap less often).

      Opt__13

         ACT 10   

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

      Opt__14

      The result with the same input data, but with a deposit of 10,000 will be different (the profit is 1.5 times more). This is due to the fact that starting from deposit=8000 (BalanceForAdd=800) lot=0.1 and more often increases by 0.01.

      Opt__15

                             HOW "Limit_Max_Lot" WORKS                    

      On the tested account, the broker set the maximum trade volume limit MaxLot=500. With deposit=500000 and BalanceForAdd=500, lot=10 is used for the first deal in the position. For subsequent trades on this position, lot>500 may be required and the adviser will set lot=500. Therefore, there are drawdowns.

      O16

      If Limit_Max_Lot=true, the first trade in a position will not exceed MaxLot/100.

      O17



      Файлы: