If you prefer to set up automated actions in your trading terminal, then Expert Advisors (EA) are for you. Let’s take a closer look at what EAs are and how you can manage them in both MT4 and MT5 trading terminals.
What is an EA?
An EA is a program that runs through a trading terminal to monitor and automatically carry out trading actions without a trader’s direct involvement. When you install an EA, you’ll need to set up certain criteria such as trigger alerts, notifications, and trading actions depending on the preferred market conditions that you’ve programmed the EA to track.
EAs are programmed in either MetaQuotes Language 4 (MQL4) or MetaQuotes Language 5 (MQL5) to work with MT4 and MT5 respectively.
Note: EAs only function in desktop trading terminals for MT4 and MT5, and will not work on the mobile or web versions of the terminals.
Setting up EA
Installation
- Download EAs from the MQL Community, which are MetaTrader official sources.
- Load up MT4 or MT5, depending on which trading terminal you use.
- Open File > Open Data Folder - find and then copy the downloaded files to the following path MQL4/5 > Experts.
-
- If any EAs require libraries (.dll files) or settings (.set files), they must be copied to their corresponding folders - MQL4/5 > Libraries and MQL4/5 > Settings respectively.
- EAs will generally direct you where to put additional files if necessary.
- Restart MT4/5.
- Open Tools > Options and then navigate to the Expert Advisors tab.
- Tick Allow algorithmic trading, then click OK.
-
- Also, tick Allow DLL imports and/or Allow WebRequest for listed URL if you know your EA requires .dll file capability and/or a connection to a specific URL.
- Please be sure of your EA’s requirements as they can vary on which permissions are required to run.
- In the Navigator window, expand the Expert Advisors entry by clicking the + symbol (path for MT5 is Expert Advisors > Advisors).
- Locate your EA, then click and drag it onto an instrument chart window of your choice; this will bring up any preferences your EA allows. Once satisfied, click OK and your EA will be set up.
Alternative EA installation
Alternatively, you can also directly install an EA from within the trading terminal itself. Here’s how:
- Launch MT4 or MT5, depending on which trading terminal you use.
- Head to the Code Base tab and right-click to bring up its options.
- Select Expert Advisors.
- Choose your preferred EA and right-click to download.
- After downloading, a window will pop up asking if you would like to add the EA to an active chart.
-
- If you would like to add the EA to an active chart, click Yes.
- If you click No, your newly downloaded EA will be displayed in the Navigator window.
- In the Navigator window, you can locate downloaded EAs by expanding the Expert Advisors entry by clicking the + symbol.
- Locate your chosen EA, click and drag it onto an instrument chart window of your choice or simply double-click to run the EA.
- A window will then appear for you to manage your EA preferences for that instrument.
- Once you have set your preferences, click OK.
Removing the EA
- To remove the EA, right click on the instrument chart window that has the EA installed.
- From the options:
-
- For MT4: Select Expert Advisors and click on Remove from pop-up window
- For MT5: Select Expert List and click on Remove from pop-up window.
- The EA is now removed from the instrument chart window.
EAs present on the terminals by default
All default EAs that come with MT4 and MT5 are designed by MetaQuotes Software.
Here’s a list of the EAs present on MT4:
- MACD Sample: implements a very simple moving average convergence and divergence (MACD) based strategy of Forex trading.
- Moving Average: uses a moving average strategy; if a candle crosses from below, the EA will enter a long position. Vice versa for the short position.
Here is a list of the EAs present on MT5:
- ExpertMACD: designed to use moving average convergence and divergence in order to enter a trade.
- ExpertMAMA: MAMA stands for MESA Adaptive Moving Average, which is a trading strategy that adapts to price changes.
- ExpertMAPSAR: uses two indicators, Moving Average and ParabolicSAR, to automate trading.
- ExpertMAPSARSizeOptimized: this uses the same MAPSAR combination as above, but the size of trades can be optimised.
Expert Advisors may automate trading, but the strategies implemented are best understood before using an EA. It is recommended to use due diligence when installing and using EAs.
Compatibility
Although the steps required to install EAs are the same for both MT4 and MT5, it is not possible to use an EA for MT4 on MT5 or vice versa. This is because EAs are specifically programmed using the language suited to the appropriate trading terminal - MQL4 for EAs on MT4 and MQL5 for EAs on MT5.