How To Setup EA (Expert Advisor) on MT4

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 1

How To Setup EA (Expert Advisor) on MT4

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 1

 

Step 1: Retrieve and extract your EA archive by downloading and unzipping it.

Access your EA folder. Inside, you will find all the necessary files for your Expert Advisor to function.

Typically, basic EAs comprise two files with the following extensions:

  1. .ex4 – a compiled assembly (executable file) used to initiate your EA in the MetaTrader terminal.
  2. .mq4 – the source code for your EA, viewable in MetaEditor. This file allows for adjustments or updates to your EA code.

For more advanced EAs, additional files may be included to ensure the proper functioning of the EA.

Step 2: Transfer your EA files into your MT4 terminal.

Ensure that all files essential for the functioning of your Expert Advisor in MetaTrader 4 are placed within the Data Folder of your MT4 terminal.

To accomplish this:

  1. Open your MetaTrader 4.
  2. Navigate to the upper menu and click on “File.”
  3. Choose “Open Data Folder.”

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 1

 

The Data Folder associated with your MT4 terminal will now be accessible.

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 2

Inside the recently opened Data Folder, navigate to MQL4 -> Experts. This directory is where you should place your EA files. If your EA comprises two files (.ex4 and .mq4), simply copy and paste them into the Experts folder. In the case of an EA with multiple files, copy and paste the unzipped folder from Step 1 into the Experts folder

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 3

Important to note, if your EA relies on custom indicators, these should be placed in a distinct folder: MQL4 -> Indicators. For files with a .dll extension, they belong in the MQL4 -> Libraries folder. Once you have copied all the necessary files into their respective folders, restart your MT4 terminal. Alternatively, open the “Navigator” in your MetaTrader 4, right-click on “Expert Advisors” in the menu, and select “Refresh.”

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 4

Congratulations! Your EA has been successfully installed in your MT4 terminal and can now be found in the “Navigator” window under the “Expert Advisors” menu

Step 3: Before initiating, review and verify your EA settings

Navigate to the upper navigation menu and click on “Tools,” then choose “Options.”

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 5

In the opened window, go to the “Expert Advisors” tab and ensure the following:

  1. Confirm that “Allow automated trading” is enabled.
  2. Enable “Allow DLL imports” if your EA utilizes .dll files.
  3. For security reasons, if your EA is tailored for a specific financial asset or time-frame, activate “Disable automated trading when the chart’s symbol or period has been changed.”

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 1

Verify whether “AutoTrading” is enabled on the MT4 terminal control panel. For your EA to execute trades automatically, this button should be activated. When switched on, the button will display a green indication.

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 7

Step 4: Initiate your Expert Advisor

Before commencing your EA, make sure you have opened the chart with the desired financial asset and time-frame.

In the “Navigator” window, expand the “Expert Advisors” menu, and choose the specific EA you wish to start

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 8

Double-click on the EA or drag-and-drop it onto the chart. This action will open the settings window of the Expert Advisor.

On the “Common” tab, confirm that your EA is permitted to trade automatically. Additionally, review other parameters such as allowing alerts (if your EA utilizes them) and .dll imports (if your EA uses external .dll files)

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 9

On the “Input” tab, verify that all EA parameters align with your trading strategy. Once you’ve confirmed all the settings, click “OK.” Your Expert Advisor is now operational

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 10

Step 5: Confirm that your EA is actively running

If the installation and launch procedures were successful, you should observe a smiley face at the top right corner of the chart, near the name of your Expert Advisor.

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 11

Examine the “Experts” and “Journal” tabs at the bottom of your terminal. If there are no error alerts present, it indicates that your Expert Advisor has been successfully launched and is currently active

How to Install and Run Expert Advisor (EA) in MetaTrader 4 - 12

Same settings for MT5

Leave a Reply

Your email address will not be published. Required fields are marked *