First step: Open Strategy Tester Window.
Then select “full optimization”

Select Expert “As capital EA MT5”.
Select Symbol, Time frame, and period that you want to optimize.

Click on “Input settings tab”
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.
When you are ready click on Start.

After a Short Time “Metatrader 5” will display results showing profit also periods and factor that make this preformance.

With right click on the best result a menu is displayed in which we select initial simulation

It will do a test with that configuration and it will show us the performance graph and so we can ensure that the configuration is good
