How to Optimize with MT4
First step: Open Strategy Tester Window.
Second step: Select “As capital EA”.
Third Step: Select Symbol, Time frame, and period that you want to optimize.
Fourth step: Check Optimization box and select Open prices only model. (This will make optimization faster).
Ones you are ready select Expert Properties.

Set Configurations as it is on the next picture.

We are going to optimize using only trade 1 so we set trade 2 and 3 as false.
Periods and factors are the main parameters to optimize, we mark the box that they have on the left side and configure the start, step and stop values as shown in the image.
Also set a valid volume for the Lot size and Lot step acording to the symbol you are using .
Now we run the test and wait for results.

Getting the results
We array profit colum from major to minor.
On the right side we get the periods and factor configuration that are best to use.

Now we can ensure the information by making a single test.

As we can see on preformance graph the balance is increasing constanly so now we are sure that this is a good set to use.