How to install an Expert Advisor
MQL 4 programming language supports creation of three types of executable files, each of which performs its own task. Due to this reason every type of these files is located in its own directory:
– scripts are stored in “…\ scripts” folder;
– indicators are stored in “…\ Indicators” folder;
– Expert Advisors are stored in “…\ Experts” folder;
It was done to identify the type of a file by its location, since they have the same extension.
You need to complete the following steps to install these programs into your MetaTrader 4:
1) Run MetaTrader 4 and find your custom data directory by clicking “File – Open Data Folder”. After an Explorer window appears, open “mql4” folder in the window. The folders, where we must place our files to, are located in the“mql4” folder. Put an Expert Advisor file (with “***.ex4” or “***.mq4” extension) to the “Experts” folder, an Indicator file to the “Indicators” folder, and a Script file to the “scripts” folder.
Files with “***.mq4” extensions are MQ4 source code files.
Files with “***.ex4” extensions are Expert Advisors or Indicators.
2) If you have “***.mq4” file only, you need to convert it into “***.ex4” file. To do it, just reload MetaTrader 4 or run MetaEditor, load the “***.mq4” file in the editor and compile it by pressing “Compile” button. After doing that, you will get the “***.ex4” file.
3) Make sure that the “***.ex4” file of an Expert Advisor is located in the “…\ Experts” folder. Indicator (if it is included in the “***.ex4” file) must be put in the “…\ Indicators” folder. If you have the “***.ex4” file (without a source code pf a program) only, its icon will be colored in grey in the “Navigator” window. It will not affect performance of the program: it will continue performing its tasks, but you will not be able to change its source code.
To start trading on a real or a demo account, you need to log in your trading terminal, open a currency chart and attach an Expert Advisor to the chart. To do it, just drag-and-drop it from the “Navigator” window to the chart window by holding the left mouse button. Don’t forget to check “Allow live trading” option.
Press “AutoTrading” button.
A smiling face must appear in the right upper corner:
Afterwards your Expert Advisor will start trading. If you think that it doesn’t open orders or operates improperly, look at the entries made in “Experts” and “Journal” tabs.