If you prefer to set up automated actions within your trading platform, Expert Advisors (EAs) are for you.
EAs may automate trading, but the strategies implemented should be understood before use. Due diligence is recommended when installing and using EAs.
What is an EA?
An EA program runs within a trading platform to monitor and automatically carry out trading actions without direct input. During installation, a user must set specific criteria (trigger alerts, notifications etc.) that result in trading actions on market conditions the EA is programmed to track.
EAs are programmed in MetaQuotes Language 4 (MQL4) or MetaQuotes Language 5 (MQL5) to work with MT4 and MT5, respectively.
Consider the following about EA:
- Only desktop trading terminals for MT4 and MT5 support EA; they do not operate on mobile or web versions.
- Please ensure that your trading account has the minimum funds requirement as EA may be disabled without funds available.
- If your EA is disabled, it may be because the settings are too aggressive. This can lead to an overload of the terminal with excessive submissions and irrelevant requests. Ensure the settings are appropriately configured to avoid overwhelming the system.
If your EA is ever disabled and cannot be manually enabled, please open a ticket in the Support Hub for assistance and reactivation.
Setting up EA
- Download EAs from the MQL Community, MetaTrader’s official sources.
- Log in to your respective MT4 or MT5 trading terminal.
- Open File > Open Data Folder, then find and copy the downloaded EA files to the following path: MQL4/5 > Experts.
- If any EAs require libraries (.dll files) or settings (.set files), copy them to the corresponding folders: MQL4/5 in Libraries and MQL4/5 in Settings. If necessary, EAs will direct you where to place additional files.
- Next, restart the trading terminal.
- Open Tools then Options and then navigate to the Expert Advisors.
- 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 may vary on which permissions are required to run.
- Next, in the Navigator window:
- For MT4: Expand the Experts Advisors entry by clicking the + symbol .
- For MT5: Click Expert Advisors and then Advisors.
- Locate your EA. Click and drag it onto the preferred instrument chart window to bring up any preferences your EA allows. Once done, click OK.
You can also directly install an EA from within the trading platform:
- Launch MT4 or MT5, depending on which trading terminal you use.
- Head to the Code Base tab, right-click to bring up its options, and select Expert Advisors.
- Choose your preferred EA and right-click to download.
- After downloading, a window asking to add the EA to an active chart will pop up. Click Yes to add.
- If No, the downloaded EA will be displayed in the Navigator window by expanding the Expert Advisors entry by clicking the + symbol.
- Click and drag the EA onto an instrument chart window, or 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.
To remove an EA, right-click on the instrument chart window with the EA installed:
- For MT4: Select Expert Advisors and click on Remove.
- For MT5: Select Expert List and click on Remove.
Default EAs
All default EAs that come with MT4 and MT5 are designed by MetaQuotes Software.
MT4-based EAs:
- MACD Sample: Implements a simple moving average convergence and divergence (MACD) based Forex trading strategy.
- Moving Average: Uses a moving average strategy. The EA will enter a long position if a candle crosses from below and vice versa for the short position.
MT5-based EAs:
- ExpertMACD: Designed to use moving average convergence and divergence to enter a trade.
- ExpertMAMA: MAMA stands for MESA Adaptive Moving Average, a trading strategy that adapts to price changes.
- ExpertMAPSAR: Uses two indicators, Moving Average and ParabolicSAR, to automate trading.
- ExpertMAPSARSizeOptimized: Uses the same MAPSAR combination as above, but the size of trades can be optimized.
Compatibility
Although the steps required to install EAs are similar for 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.