To create your own expert advisors you use the MQL4 programming language. To get started, right-click Expert Advisor in the Navigator window, then select Create.
This opens MT4’s built-in MetaEditor, which displays the Expert Advisor Wizard.
Use the wizard to specify the type of the expert advisor you wish to create. Enter a name for your expert advisor, the developer’s name and the developer’s website in the General Properties window. Click Add to add a parameter to the expert advisor.
Select the EA you wish to test from the Expert Advisor drop-down menu, and the instrument you wish to run the test against from the Symbol menu.
Click Expert Properties to modify the settings before you run the test. Via the Optimization settings you can run multiple tests that mimic different market conditions.
Testing expert advisors
You can choose one of five models for optimization by using the Optimized Parameter drop-down menu on the Testing tab.
- Balance indicates the smallest balance value in the deposit currency
- Profit Factor determines the gross profit and gross loss of one trade
- Expected Payoff shows the average profit/loss factor of one trade
- Maximal Drawdown calculates the largest loss of one trade
- Drawdown Percent determines the maximal drawdown of the initial deposit