How to Install an EA on MT4 Platform

Expert advisors or forex robots, are used to trade the forex market in automated mode, as they can execute trade entries and exits without manual input from the trader. Expert advisors vary in complexity and function and can be likened to the high frequency trading software that is used by institutional traders. In order to get the very best of expert advisors, they need to be setup into Virtual Private Servers to achieve 100% uptime and enable them trade round the clock whenever there are opportunities to do so.

One of the most popular retail platforms in the forex market is the MT4 platform. This platform is now offered by almost every broker that there is in the forex market. This platform comes with a feature that is revolutionary, and that is the ability to add expert advisors to the platform for automated trading. Therefore, this tutorial will focus on how to add an expert advisor to the MT4 platform. The information on this article can be used along with the information on the article “How to Use Forex VPS”, as you will need to setup your EA first on the MT4 platform and subsequently on your VPS.

Step by Step Process of Adding an EA to MT4
The process by which EAs are added to the MT4 platform has changed. These changes were effected after the launch of the MT4 Build 600 platform. This change altered the way EAs were attached to the MT4 and the structure of the folders on which the platform files were based.

Under the new system, EAs can no longer be attached directly to the Experts folder using a copy and paste procedure. Now you must start the process from the MT4 trading interface itself and follow a sequence of steps to be able to add the EA in the correct folder for use.

Step 1 – It is assumed you must have downloaded the MT4 platform from your broker. Open the platform. On the main menu located at the top end of the platform interface, click File > Open Data Folder. The data folder of MT4 will open on your PC.

attachEA1

Step 2 – In the data folder of MT4, double-click on “MQL4” as shown below. This opens up new folders, one of which is marked “Experts”. Double click on the Experts folder.

attachEA2

Step 3 – Copy the EA’s .mql4 source file (if you do not have the source file, you can copy the .ex4 file extension). Paste the source file into the open “Experts” folder. You can use Ctrl + C, then Ctrl + V shortcuts to do this.

attachEA3

Step 4 – After copying and pasting the source file of your EA into the Experts folder, restart the MT4 platform by closing and opening it again. The EA would now be located in the correct folder. This is evidenced by its appearance in the Experts submenu when you click this in the Navigation window located on the left-side of the platform.

attachEA4

Attaching Your Expert Advisors to Your Charts
To get your EAs to start trading for you, they must first be attached to the chart of the currency pair you want the EA to trade on, and the EA must be enabled to either trade in full automatic mode or in semi-automatic mode (where the trader confirms the order manually).

Expert advisors can only be attached to the chart of the currency pair of choice from the Navigator Menu.

Experts Folder in the Navigator Menu
As you can see from the snapshot, double clicking “Expert Advisors”, or clicking the “+” sign in front of it just once will show the list of expert advisors available on the folder.
Let us assume we want to add the expert advisor known as “IgnacEA_2” to the GBPJPY chart. How are we going to go about it?
– Click on the “Experts” folder in the Navigator window. This shows the list of expert advisors available. It is assumed that we have added IgnacEA_2 to our list of experts in the appropriate folder.
– Double click on IgnacEA_2 in the Navigator Window. Alternatively, right-click on “IgnacEA_2” and in the pop-up window that appears, click on “Attach to Chart”

– Performing anyone of the two actions just described will open another pop-up window which will display as shown below:

– Under the Common Tab (which is what is shown above), check the “Enable Alerts” box so you can receive alerts on when the EA places a trade. Also check the “Allow Live Trading” box, and leave the other checkboxes as they are.
– If you want to make any changes to the internal workings of the EA, click the “Inputs” tab. If you have no changes to make, you can skip this step.

The EA is now attached to the platform. But all is not quite ready yet. If you look at the chart, you will notice the icon for the expert advisor on the top right corner of the chart, circled in red. The icon shows a face, but in this case, the face is frowning. This is because even though the expert advisor has been added to the chart, it has not been activated for trading.

This issue is taken care of in the next step. This is by clicking the button marked “Autotrading” on the top section of the platform interface as shown below:

As soon as the Autotrading button is clicked, the icon changes from a frowning face to a smiling one, which indicates that the expert advisor is now ready for action.

Clicking the Autotrading button activates and inactivates the EA. When activated, the Autotrading button looks depressed, but when inactivated, the button appears raised. You should always be conscious of the position of this button. Merely looking at the face of the EA icon on the top right corner of the page will indicate whether the button is active or not. This will prevent you from taking on unwanted trades on your account.

Connecting an MT4 Platform to a VPS
The final piece of the puzzle is to attach the MT4 platform to which an EA has been loaded to a VPS. You have been shown how to attach your EA to your MT4 platform. However, the EA cannot work when the MT4 is off, which is what happens when your PC shuts down or when you are disconnected from the internet. So in order to get your EA to keep trading on the MT4, it is essential that you get all setup on a VPS.
Here is how to connect your EA-loaded MT4 terminal on your preferred VPS.
1) It is assumed you have paid for a VPS plan. Connect to your VPS from your local computer.
2) From the C-drive on your local computer or from the drive where your MT4 client terminal is installed, click on Program files, then press Ctrl + C to copy the entire MT4 Drive folder.
3) Go to the C-drive on your VPS Computer and click on Program Files. Then press Ctrl + V to paste the MT4 folder which you copied in the previous step.
4 ) Double click on the MT4 Folder to open it, then copy the Terminal by pressing Ctrl + C after highlighting it with your computer cursor.
5) Paste the MT4 Terminal that you have copied on the desktop of the VPS computer.
6) Double-click on the Terminal to open the MT4 platform.
You will now be able to trade with your EA on your local computer terminal with all the benefits of forex VPS hosting, having transformed your PC into a VPS. After this step, you can then proceed to add your EA as already described above to the MT4 which is now hosted on your forex VPS MT4 terminal as you would do on your local computer terminal.