MQL4/MQL5 Wizard allows creating fully operational EAs based on the standard library supplied together with the trading platform. To do this, select "Expert Advisor (generate)" on the first page of MQL4/MQL5 Wizard.
Fill in the following fields:
A set of mandatory parameters created by default is described below:
The Expert Advisor does not run on charts with a symbol or a period other than the ones specified in its settings. In case of an incorrect symbol or period, the appropriate message is displayed in the platform log. |
Signal modules are selected at this stage. An EA makes trading decisions based on data received from them. 64 modules are available in total. You can add any combination of modules, as well as a few similar modules with different settings, to the EA.
The mechanism of making trade decisions is described in the MQL5 Reference. |
To add or change the module settings, click Add or Modify.
Specify signal module parameters:
Each signal module has a certain set of built-in parameters:
|
At this stage, select the type of moving stop loss and take profit levels.
Select a trailing type in the Name field. Source code files of the function data are located in the folder [platform data directory]\MQL5\Include\Expert\Trailing\. Each type of trailing has its own set of parameters.
If the parameter is marked with icon, it is available as an EA input variable. Such parameters can be changed during the EA operation and used when optimizing in the strategy tester. Double-click on the parameter, to make it fixed (unavailable for modification when the Expert Advisor is running). Its icon turns gray – . |
At this stage, you should select a money management type for your EA.
Set a money management type in the Name field. Source code files of the function data are located in the folder [platform data directory]\MQL5\Include\Expert\Money\. Each type of money management has its own set of parameters.
If the parameter is marked with icon, it is available as an EA input variable. Such parameters can be changed during the EA operation and used when optimizing in the strategy tester. Double-click on the parameter, to make it fixed (unavailable for modification when the Expert Advisor is running). Its icon turns gray – . |
Click Finish to generate an MQ5 file of the EA. To obtain an executable EA file that can be run in the trading platform, compile the obtained MQ5 file. To do this, click Compile or F7.
Special classes from the Standard library are used as signal, trailing and money management modules. In addition, you can write your own classes (as well as create them based on the existing ones). Place them in the following directories to make them available in MQL5 Wizard:
Find out more about creating your own modules in the article "MQL5 Wizard: How to create a module of trading signals". |