You found a forex robot that looks promising, you downloaded the files, and now you are staring at MetaTrader wondering where everything goes. You are not alone. Learning how to install an Expert Advisor on MT4 and MT5 is the first technical hurdle every automated trader faces, and it is also where many beginners make small mistakes that stop their EA from ever placing a single trade.
This guide walks you through the entire process for both MetaTrader 4 and MetaTrader 5, from finding the correct data folder to enabling Algo Trading, loading preset files, testing in the Strategy Tester, and running your EA around the clock on a VPS. We also cover the most common installation errors and exactly how to fix them. Whether you bought a commercial forex robot, downloaded a free EA, or coded your own in MQL4 or MQL5, by the end of this article you will know precisely how to get it running.

Quick Answer: How to Install an EA in 6 Steps
If you are in a hurry, here is the short version. The process is almost identical in MT4 and MT5; only the folder name differs.
- Open MetaTrader and click File → Open Data Folder.
- Open the MQL4 → Experts folder (MT4) or the MQL5 → Experts folder (MT5).
- Copy your EA file (.ex4 for MT4, .ex5 for MT5) into that folder.
- Restart MetaTrader or right-click Expert Advisors in the Navigator and choose Refresh.
- Drag the EA from the Navigator onto a chart, check Allow live trading / Allow Algo Trading, and click OK.
- Turn on the AutoTrading (MT4) or Algo Trading (MT5) button in the toolbar.
That is the core of it. The rest of this guide explains each step in detail, shows you what can go wrong, and helps you set up your EA safely and professionally.
What Is an Expert Advisor?
An Expert Advisor (EA) is an automated trading program that runs inside the MetaTrader platform. You will also hear EAs called forex robots, trading bots, or algorithmic trading systems. Once attached to a chart, an EA can analyze price data, open and close trades, manage stop losses and take profits, and even adjust position sizes, all without you clicking a single button.
EAs are written in MetaQuotes’ own programming languages: MQL4 for MetaTrader 4 and MQL5 for MetaTrader 5. Each EA follows a set of rules defined by its developer. Some trade simple moving average crossovers, while others use grid, martingale, scalping, news-trading, or machine-learning-based logic.
The main advantages of using an Expert Advisor include:
- Emotion-free execution: The robot follows its rules without fear, greed, or hesitation.
- 24-hour market coverage: The forex market trades around the clock from Monday to Friday, and an EA never needs sleep.
- Speed: An EA can react to price changes in milliseconds.
- Backtesting: You can test a strategy on years of historical data before risking real money.
- Consistency: Every trade is executed the same way, which makes performance easier to measure and improve.
Of course, an EA is only as good as its strategy, and no robot is guaranteed to make money. That is why proper installation, configuration, and testing matter so much. A great EA installed incorrectly or set up with the wrong risk settings can still lose money quickly.
MT4 vs. MT5: What Is Different When Installing an EA?
MetaTrader 4 and MetaTrader 5 look similar, but they are separate platforms with different programming languages. The single most important rule to remember: an MT4 Expert Advisor will not run on MT5, and an MT5 Expert Advisor will not run on MT4. If you bought an EA, make sure you download the version that matches your platform.
Here is a side-by-side comparison of the key differences that affect EA installation:
| Feature | MetaTrader 4 (MT4) | MetaTrader 5 (MT5) |
|---|---|---|
| Programming language | MQL4 | MQL5 |
| Compiled EA file | .ex4 | .ex5 |
| Source code file | .mq4 | .mq5 |
| EA folder path | MQL4\Experts | MQL5\Experts |
| Indicator folder path | MQL4\Indicators | MQL5\Indicators |
| Global automation button | AutoTrading | Algo Trading (AutoTrading in older builds) |
| Chart status icon | Smiley face (happy = active) | Hat icon (blue = active) |
| Strategy Tester | Single-threaded, one symbol | Multi-threaded, multi-currency, real ticks, cloud optimization |
| Position accounting | Hedging | Netting or hedging (depends on account) |
That last row matters more than many traders realize. Some MT5 accounts use netting mode, where you can only hold one position per symbol. EAs designed for hedging (for example, grid or recovery systems that open buy and sell trades at the same time) may not work properly on a netting account. If your EA requires hedging, ask your broker for an MT5 hedging account.

Understanding EA File Types
When you download an Expert Advisor, you will usually receive a ZIP archive containing one or more files. Knowing what each file does will save you a lot of confusion.
.ex4 and .ex5: Compiled EA Files
These are the executable versions of an EA. An .ex4 file runs on MT4, and an .ex5 file runs on MT5. Commercial EAs are almost always delivered in this compiled format because it protects the developer’s source code. You cannot open or edit these files, but MetaTrader can run them directly.
.mq4 and .mq5: Source Code Files
These are the human-readable source code files. If you have an .mq4 or .mq5 file, you can open it in MetaEditor, read or edit the code, and compile it into an .ex4 or .ex5 file. In most cases, MetaTrader compiles source files automatically when you restart the platform, but we will show you how to do it manually as well.
.set Files: Preset Settings
A .set file stores a specific configuration of the EA’s input parameters, such as lot size, risk percentage, stop loss, take profit, trading hours, and symbol-specific settings. Many developers provide several .set files, for example one for EURUSD and one for GBPUSD, or one for low risk and one for higher risk. You load these inside the EA’s Inputs tab.
Other Files You May Find
- Custom indicators (.ex4/.ex5 or .mq4/.mq5): Some EAs rely on custom indicators that must go into the Indicators folder.
- Include files (.mqh): Code libraries used when compiling source code. These go into the Include folder.
- Libraries (.ex4/.ex5 in Libraries): Shared compiled code used by the EA.
- DLL files (.dll): External Windows libraries, often used for licensing or advanced functions. These go into the Libraries folder and require DLL imports to be allowed.
- Templates (.tpl): Saved chart layouts that may include the EA and its settings. These go into the templates folder.
- PDF or TXT manuals: Always read them. They usually contain the recommended broker type, timeframe, currency pairs, and minimum deposit.
Before You Start: Your Pre-Installation Checklist
A few minutes of preparation can prevent hours of troubleshooting. Run through this checklist before you install any forex robot.
- Install the desktop version of MetaTrader. Expert Advisors only run on the desktop terminal. The MetaTrader web terminal and the iOS/Android mobile apps cannot run EAs. You can, however, use the mobile app to monitor trades your EA opens.
- Download MetaTrader from your broker. Your broker’s version comes preconfigured with their trade servers, which makes logging in easier.
- Open a demo account first. Never run a new EA on a live account before testing it on demo. A demo account lets you confirm the EA is installed correctly and behaves as expected, at zero risk.
- Check broker compatibility. Some EAs, especially scalpers, need low spreads, fast execution, and an ECN or raw-spread account. Others require hedging. Read the EA’s requirements.
- Check symbol names. Many brokers add suffixes such as EURUSD.m, EURUSDpro, or EURUSD.raw. Some EAs need you to enter the exact symbol name in their settings.
- Get your files from a trusted source. Only download EAs from the developer, the official MQL5 Market, or a reputable vendor. Cracked or “free premium” EAs from random websites can contain malware, and DLL files in particular can execute code on your computer.
- Extract ZIP files. MetaTrader cannot read files inside a ZIP archive. Right-click the archive and choose “Extract All” first.
- Note your license details. Some commercial EAs are locked to a specific account number or require a license key. Have that information ready.

How to Install an Expert Advisor on MT4
Let’s begin with MetaTrader 4, which is still widely used by retail forex traders and offered by many brokers. Follow these steps in order.
Step 1: Open the MT4 Data Folder
Launch MetaTrader 4 and log in to your account. In the top menu, click File → Open Data Folder. A Windows Explorer window opens, showing the data directory for this specific MT4 installation.
This step is important. Since Windows introduced stricter permissions on the Program Files directory, MetaTrader stores user files in a separate location inside your AppData folder. If you copy your EA into the program installation folder instead of the data folder, it will not appear in MetaTrader. Always use File → Open Data Folder to make sure you are in the right place.

Step 2: Navigate to MQL4 → Experts
Inside the data folder, double-click the MQL4 folder, then open the Experts folder. This is where all MT4 Expert Advisors live. You may already see a couple of sample EAs, such as “MACD Sample” and “Moving Average,” which MetaQuotes includes with every installation.
While you are here, take note of the other folders inside MQL4, because you may need them later:
- Experts — Expert Advisors (.ex4 / .mq4)
- Indicators — Custom indicators
- Scripts — One-time scripts
- Include — .mqh include files
- Libraries — Libraries and DLL files
- Presets — .set files (MT4 looks here first when you click Load)
- Files — Data files the EA may read or write

Step 3: Copy the EA File into the Experts Folder
Open a second Explorer window where your downloaded (and extracted) EA files are stored. Copy the .ex4 file (or the .mq4 file if you have source code) and paste it into the MQL4\Experts folder. You can also drag and drop the file.
If your EA came with additional files, put each one in the correct folder now: indicators into Indicators, DLLs into Libraries, .mqh files into Include, and .set files into Presets. If the developer’s ZIP already contains an “MQL4” folder structure, you can simply copy that whole MQL4 folder into the data folder and let Windows merge the contents.
Step 4: Restart MT4 or Refresh the Navigator
MetaTrader does not always detect new files automatically. You have two options:
- Refresh: Open the Navigator window (View → Navigator or press Ctrl+N), right-click Expert Advisors, and select Refresh.
- Restart: Close MT4 completely and open it again. This is the more reliable method, especially if you added DLLs, libraries, or source code that needs to be compiled.
After refreshing, expand the Expert Advisors section in the Navigator. Your EA should now appear in the list. If it does not, jump to the troubleshooting section below.

Step 5: Enable Automated Trading in MT4 Options
Before attaching the EA, configure the global settings. Go to Tools → Options (or press Ctrl+O) and open the Expert Advisors tab. Here you will find several important checkboxes:
- Allow automated trading: Must be checked for any EA to trade.
- Disable automated trading when the account has been changed: A useful safety feature. Leave it checked unless you switch accounts often.
- Disable automated trading when the profile has been changed: Same idea for chart profiles.
- Allow DLL imports: Only check this if your EA requires DLLs and comes from a trusted developer.
- Allow WebRequest for listed URL: Needed if your EA connects to an external server, for example for license checks, news filters, or trade copying. Add the exact URLs provided by the developer.
Click OK to save.

Step 6: Attach the EA to a Chart
Open a chart for the currency pair and timeframe the EA is designed for. You can do this via File → New Chart and choosing the symbol, then selecting the timeframe from the toolbar (M1, M5, M15, H1, H4, D1, and so on).
Now drag the EA from the Navigator onto the chart, or double-click it while the chart is active. The EA properties window opens with several tabs:
- About: Information from the developer.
- Common: General permissions. Check Allow live trading. If the EA uses DLLs, also check Allow DLL imports. You can also choose whether the EA may open long trades, short trades, or both.
- Inputs: The EA’s configurable parameters, such as lot size, risk, and stop loss. This is where you load .set files.
- Dependencies: Shows DLLs and libraries the EA imports (if any).
Review the settings and click OK.

Step 7: Turn On the AutoTrading Button
In the main toolbar, find the AutoTrading button. When automated trading is disabled, the icon shows a red stop symbol. Click it once, and it turns green with a play symbol. This is the master switch for all EAs in the terminal. If it is off, no EA can trade, regardless of individual chart settings.
Step 8: Confirm the Smiley Face
Look at the top-right corner of the chart. You should see the EA’s name followed by a small face icon:
- Smiling face: The EA is running and allowed to trade.
- Frowning face: The EA is attached but cannot trade. Either AutoTrading is off, or “Allow live trading” is unchecked in the EA’s properties.
Finally, open the Terminal window (Ctrl+T) and check the Experts tab. You should see a message saying the EA was loaded successfully, plus any initialization messages the developer added. Congratulations, your EA is installed on MT4.

How to Install an Expert Advisor on MT5
The MT5 installation process follows the same logic, but the folder names and some labels are different. MetaTrader 5 is the newer platform, and many brokers now promote it over MT4, so it is worth knowing well.
Step 1: Open the MT5 Data Folder
Start MetaTrader 5 and log in. Click File → Open Data Folder. Just like MT4, this opens the correct user data directory for this specific installation. If you have several MT5 terminals from different brokers installed, each one has its own data folder, so always open it from inside the terminal you want to use.
Step 2: Navigate to MQL5 → Experts
Open the MQL5 folder and then the Experts folder. You will notice that MT5 already contains subfolders such as “Examples,” “Advisors,” and “Market.” You can paste your EA directly into the Experts folder or create your own subfolder (for example, “My EAs”) to keep things organized. MT5 shows subfolders as expandable groups in the Navigator.

Step 3: Copy the .ex5 File
Copy your .ex5 file (or .mq5 source file) into the MQL5\Experts folder. Remember: .ex4 files will not work here. If the EA comes with indicators, place them in MQL5\Indicators; DLLs go into MQL5\Libraries, and .mqh files into MQL5\Include. MT5 stores .set files in MQL5\Presets, although you can load a .set file from any location.
Step 4: Refresh the Navigator
Back in MT5, open the Navigator (Ctrl+N), right-click Expert Advisors, and select Refresh. Alternatively, restart the terminal. Your EA should now be listed under Expert Advisors.
Step 5: Enable Algo Trading in MT5 Options
Open Tools → Options (Ctrl+O) and click the Expert Advisors tab. MT5 offers more granular controls than MT4:
- Allow algorithmic trading: The global permission. Check it.
- Safety switches: MT5 can automatically disable algorithmic trading when the account changes, when the profile changes, when the chart symbol or period changes, or (in recent builds) when an external Python API manages trading.
- Allow DLL imports: Only for EAs that need them and come from trusted sources.
- Allow WebRequest for listed URL: Add any URLs the EA needs to communicate with.
The “disable” options are protective switches. They help prevent an EA from accidentally trading on the wrong account or symbol. For most users, leaving them checked is a sensible default.

Step 6: Attach the EA to a Chart
Open the chart of the symbol the EA should trade and select the correct timeframe. Drag the EA from the Navigator onto the chart. The properties window opens with these tabs:
- Common: Check Allow Algo Trading (labeled “Allow AutoTrading” in older builds). If needed, check Allow DLL imports. Leave “Allow modification of Signals settings” unchecked unless you know you need it.
- Inputs: Edit parameters directly by double-clicking a value, or use Load to import a .set file.
- Dependencies: Lists required libraries and DLLs.
Click OK.
Step 7: Turn On the Algo Trading Button
In the MT5 toolbar, click the Algo Trading button so it turns green. Just like in MT4, this is the global master switch. When it is red, all EAs are blocked from opening new trades.
Step 8: Check the Chart Icon and Journal
In the top-right corner of the chart, MT5 shows the EA’s name and a small hat icon. A blue icon means the EA is active and allowed to trade. A gray icon means trading is disabled. Then open the Toolbox (Ctrl+T) and look at the Experts tab for the “loaded successfully” message and the Journal tab for any platform-level warnings.

Installing EAs from the MQL5 Market
If you purchased or rented an Expert Advisor through the official MQL5 Market, the installation process is even simpler, because MetaTrader handles the files for you. This works in both MT4 and MT5.
- Log in to your MQL5 community account inside MetaTrader. Go to Tools → Options → Community and enter the MQL5.com username and password you used to buy the product.
- Open the Market tab. In MT4, open the Terminal window (Ctrl+T) and click the Market tab. In MT5, you can open the Market from the Toolbox or from the Navigator.
- Find your purchase. Go to the Purchased section, find the EA, and click Install.
- Locate it in the Navigator. Market products appear under Expert Advisors → Market.
- Attach it to a chart exactly as described in the step-by-step guides above.
Keep in mind that MQL5 Market products come with a limited number of activations. Each time you install the EA on a new computer or after reinstalling Windows, one activation may be used. Plan your setup, especially if you intend to move to a VPS later, so you do not run out of activations.

EAs That Need Extra Files
Many simple EAs consist of a single file. More complex forex robots, however, depend on additional components. If any of these are missing, the EA will fail to load or will stop working without a clear explanation.
Custom Indicators
If an EA reads signals from a custom indicator, that indicator must be installed in the Indicators folder (MQL4\Indicators or MQL5\Indicators), and the file name must match exactly what the EA expects. Do not rename indicator files. If the EA cannot find its indicator, you will typically see an error in the Experts tab such as “cannot load custom indicator” or “indicator not found.”
DLL Files
DLL files are Windows libraries that give an EA abilities beyond the standard MQL language, such as advanced licensing or communication with other software. To use them:
- Copy the .dll into the Libraries folder.
- Enable Allow DLL imports in Tools → Options → Expert Advisors.
- Enable Allow DLL imports in the EA’s Common tab when attaching it.
- Check whether the DLL is 32-bit or 64-bit. Current versions of both MT4 and MT5 have specific requirements; if the developer offers two versions, use the one matching your terminal. Ask the developer if unsure.
A word of caution: DLLs can execute any code on your computer. Only enable DLL imports for EAs from developers you trust.
Include Files and Libraries
If you have the EA’s source code (.mq4 or .mq5), it may depend on .mqh include files. Place these in the Include folder before compiling. Compiled library files go into the Libraries folder. If an include file is missing, MetaEditor will show compilation errors listing the file it cannot find.
How to Compile an EA from Source Code
If your EA came only as an .mq4 or .mq5 file and does not appear in the Navigator after a restart, compile it manually:
- Press F4 in MetaTrader (or click the MetaEditor icon) to open MetaEditor.
- In MetaEditor’s Navigator, open the Experts folder and double-click your EA’s source file.
- Click Compile or press F7.
- Check the Errors tab at the bottom. “0 errors” means the .ex4 or .ex5 file was created successfully. Warnings are usually fine; errors must be fixed.
- Go back to MetaTrader and refresh the Navigator.

Configuring Your EA Settings and Loading .set Files
Installing the EA is only half the job. Configuring it correctly is what determines how much risk you take and whether the robot trades the way the developer intended.
Common EA Input Parameters
Every EA is different, but you will often see parameters like these in the Inputs tab:
- Lots / Fixed Lot Size: The position size for each trade, for example 0.01.
- Risk % / Auto Lot: Automatically calculates lot size as a percentage of your balance or equity.
- Stop Loss and Take Profit: Usually in points or pips. Note that on 5-digit brokers, 10 points equal 1 pip.
- Trailing Stop / Break Even: Rules for moving the stop loss as a trade goes into profit.
- Magic Number: A unique ID the EA uses to recognize its own trades. If you run the same EA on several charts, or several EAs on one account, give each instance a different magic number.
- Max Spread: The EA will skip trades if the spread is higher than this value.
- Trading Hours / Session Filter: Limits trading to certain hours. Pay attention to whether these times refer to your broker’s server time or GMT.
- News Filter: Pauses trading around high-impact economic releases. Often requires a WebRequest URL.
- Max Open Trades / Max Drawdown: Protective limits that can stop the EA from overexposing your account.
How to Load a .set File
- Attach the EA to a chart (or open its properties by right-clicking the chart and choosing Expert Advisors → Properties, or pressing F7 on the chart).
- Go to the Inputs tab.
- Click Load.
- Browse to the .set file and open it. All values update automatically.
- Double-check the most important values, especially lot size and risk, and click OK.
You can also adjust settings manually and click Save to create your own .set file. This is a good habit: keep a backup of every configuration you use, with a descriptive name such as “EURUSD_M15_lowrisk.set.”

Choosing the Right Lot Size
The single most common reason new EA users blow their accounts is excessive position size. As a rule of thumb, start with the minimum lot size (often 0.01) on a demo account, then increase gradually only after the EA has proven itself. If the EA offers a risk-percentage option, many experienced traders keep risk per trade at around 1% to 2% of account equity, or even lower for grid and martingale systems, which can open many positions at once.
How to Check That Your EA Is Actually Running
An EA that is attached to a chart is not necessarily trading. Use this quick verification routine after every installation:
- Global switch: The AutoTrading (MT4) or Algo Trading (MT5) button is green.
- Chart icon: The smiley face (MT4) is happy, or the hat icon (MT5) is blue.
- Experts tab: Shows “loaded successfully” and no red error messages.
- Journal tab: Shows no warnings about disabled trading, connection problems, or failed authorization.
- Connection status: The connection indicator in the bottom-right corner shows data flowing, not “No connection” or “Invalid account.”
- Chart comments: Many EAs display a status panel on the chart showing their state, spread, next trading window, or license status.
Be patient. Some strategies only trade a few times per week or wait for specific session times. “No trades yet” does not automatically mean “not working.” Check the EA’s manual for its expected trade frequency.
Backtesting Your EA in the Strategy Tester
Before running any Expert Advisor on a live account, test it. MetaTrader’s built-in Strategy Tester lets you simulate how the EA would have performed on historical data.
Backtesting in MT4
- Open the Strategy Tester via View → Strategy Tester or press Ctrl+R.
- Select Expert Advisor and choose your EA from the dropdown.
- Choose the symbol, the model (“Every tick” is the most accurate), the period, and the date range.
- Click Expert properties to set inputs or load a .set file.
- Click Start. Review the Results, Graph, and Report tabs when the test finishes.
Backtesting in MT5
- Open the Strategy Tester with Ctrl+R or View → Strategy Tester.
- Select your EA, symbol, timeframe, and date range.
- Under Modeling, choose Every tick based on real ticks for the highest accuracy, if your broker provides that history.
- Set the deposit, leverage, and execution delay to realistic values.
- Go to the Inputs tab to configure parameters, then click Start.
The MT5 tester is considerably more powerful than MT4’s. It is multi-threaded, supports multi-currency EAs, and can use the MQL5 Cloud Network for large optimizations.
What to Look For in a Backtest
- Maximum drawdown: How deep the worst losing streak went. Can you tolerate it emotionally and financially?
- Profit factor: Gross profit divided by gross loss. Values above 1.3 to 1.5 are generally considered healthy, but context matters.
- Number of trades: A handful of trades is not statistically meaningful. Look for hundreds.
- Equity curve shape: A smooth curve is good. A curve that rises steadily and then collapses often indicates martingale or grid risk.
- Modeling quality: Low-quality data produces unreliable results, especially for scalpers.
After backtesting, run the EA on a demo account for at least a few weeks (forward testing). Live market conditions, including slippage, spread widening, and requotes, often differ from the backtest.

Get more information about the power of backtesting
Running Your EA 24/5 on a Forex VPS
An Expert Advisor only works while MetaTrader is open and connected to the internet. If your computer shuts down, goes to sleep, or loses connection, the EA stops managing trades. Open positions stay open at the broker, but the EA cannot close them, trail stops, or react to market changes. That is a serious risk.
The solution is a Virtual Private Server (VPS): a remote Windows computer running in a data center around the clock. You have two main options:
Option 1: MetaQuotes Built-In Virtual Hosting
Both MT4 and MT5 include an integrated VPS service. In the Navigator, right-click your trading account and select Register a Virtual Server. MetaTrader suggests a server close to your broker for low latency. Once rented, you migrate your environment: open charts, attached EAs, their settings, and terminal options are copied to the virtual server. From then on, the hosted terminal trades for you, even when your own computer is off.
Important: after migration, the copy of the EA running on your local computer should be disabled, otherwise two instances may trade the same account. Also note that the built-in hosting does not support DLL imports, so EAs that rely on DLLs need a regular Windows VPS.
Option 2: A Standard Windows VPS
Many traders rent a Windows VPS from a hosting provider specializing in forex. You connect via Remote Desktop, install MetaTrader exactly as you would on your home PC, and follow the installation steps in this guide. This option gives you full control, supports DLLs, and lets you run multiple terminals. Many brokers even offer a free VPS when you meet a minimum deposit or trading volume.
When choosing a VPS, look for low latency to your broker’s server (ideally single-digit milliseconds), enough RAM for the number of terminals you plan to run (around 1 to 2 GB per few terminals is a common starting point), and reliable uptime.

Get more information about a reliable Forex VPS (Virtual Private Server)
Installing EAs on Mac and Linux
MetaTrader was built for Windows, but Mac and Linux users are not left out.
- macOS: MetaQuotes and many brokers offer Mac versions of MT4 and MT5. These run on a compatibility layer, but the folder structure inside is the same. Use File → Open Data Folder, and macOS Finder will open the correct MQL4 or MQL5 directory. From there, the installation steps are identical.
- Linux: MetaTrader runs through Wine. Again, use File → Open Data Folder to find the right path inside the Wine prefix.
- Alternative: Many Mac and Linux traders skip local installation entirely and run their EAs on a Windows VPS, which is often the most stable solution.
Note that EAs using Windows DLLs may not work reliably on Mac or Linux compatibility layers.
Troubleshooting: Common EA Installation Problems
Even experienced traders run into issues when installing a forex robot. Here are the problems we see most often, and how to fix them.
| Problem | Likely Cause | Solution |
|---|---|---|
| EA not visible in the Navigator | Wrong folder, wrong platform version, or ZIP not extracted | Use File → Open Data Folder, check .ex4 vs .ex5, extract files, restart |
| Sad face (MT4) / gray icon (MT5) | AutoTrading off or live trading not allowed | Turn on AutoTrading/Algo Trading and check the Common tab |
| “DLL calls are not allowed” | DLL imports disabled | Enable DLL imports in Options and in the EA’s Common tab |
| EA attached but no trades | Conditions not met, filters, symbol suffix, spread too high | Check Experts tab, trading hours, max spread, symbol name |
| Error 130 / Invalid stops | Stop loss or take profit too close to price | Increase SL/TP, check broker’s stop level |
| Error 134 / Not enough money | Lot size too large for account | Reduce lot size or risk setting |
| Error 4109 (MT4) / 10027 (MT5) | Automated trading disabled in terminal | Enable AutoTrading/Algo Trading and Allow live trading |
| License or authorization error | Account number not registered, WebRequest URL missing | Register account with developer, add URL to WebRequest list |
| EA removed itself from chart | Initialization failed | Read Experts tab message; often wrong symbol, timeframe, or license |
“My EA Does Not Show Up in the Navigator”
This is the number-one installation problem. Work through these checks:
- Did you open the folder through File → Open Data Folder in the same terminal you are using? If you have multiple MetaTrader installations, it is easy to copy the EA into the wrong one.
- Did you put the file into Experts rather than Indicators or Scripts?
- Is it the right file type? An .ex4 file will never show up in MT5, and vice versa.
- Did you extract the ZIP file? A ZIP archive inside the Experts folder does nothing.
- If you only have source code (.mq4/.mq5), did it compile successfully? Open MetaEditor and press F7 to check for errors.
- Was the EA compiled with a very old or very new build? Updating MetaTrader to the latest build often helps.
“The EA Is Attached, but It Does Not Open Trades”
First, confirm the smiley face or blue icon. Then open the Experts tab. Most well-coded EAs log why they are not trading. Common reasons include:
- The market is closed (weekend or holiday) or the EA’s trading hours have not started yet.
- Spread is above the EA’s max spread setting. This is common during rollover around 5 p.m. New York time or on accounts with wide spreads.
- Wrong timeframe or symbol. Some EAs only trade on M15 EURUSD, for example.
- Symbol suffix. If your broker uses “EURUSD.m,” an EA hard-coded to “EURUSD” may not recognize the chart.
- Magic number conflict. If another EA uses the same magic number, the EA may think a position is already open.
- Maximum trades reached or an internal drawdown limit triggered.
- Only long or only short trades allowed in the Common tab (MT4).
“Trading Is Disabled” or “Trade Is Not Allowed”
If you see this message even though AutoTrading is on, the problem may be on the account side. Check whether you logged in with your investor (read-only) password instead of your master trading password. With the investor password, you can see the account but cannot trade. Also confirm with your broker that the account is active and that the symbol is tradable on your account type.
“WebRequest” or “License” Errors
Many commercial EAs verify licenses through the internet. If the EA cannot reach its server, it may refuse to trade. Go to Tools → Options → Expert Advisors, check Allow WebRequest for listed URL, and add the exact URL provided by the developer, including “https://”. Then remove and re-attach the EA.
How to Update or Remove an Expert Advisor
Updating an EA
- Save your current settings: open the EA properties, go to Inputs, and click Save.
- Remove the EA from all charts (right-click chart → Expert Advisors → Remove).
- Open the data folder and replace the old .ex4/.ex5 file with the new version. Keep the same file name unless the developer says otherwise.
- Restart MetaTrader.
- Re-attach the EA and load your saved .set file. Check whether the new version added any new parameters.
Avoid updating an EA while it has open trades unless the developer confirms it is safe. Some EAs rely on internal state that may be lost during a restart.
Removing an EA
To stop an EA on one chart, right-click the chart and choose Expert Advisors → Remove, or simply close the chart. If you want to stop all EAs instantly, click the AutoTrading or Algo Trading button so it turns red. For a complete uninstall, delete the file from the Experts folder and refresh the Navigator. Remember that removing an EA does not close its open trades. You will need to manage or close those manually.
Best Practices for Safe Automated Trading
Installing an Expert Advisor correctly is only the starting point. These habits separate disciplined algorithmic traders from those who learn expensive lessons:
- Always demo first. Run every new EA, and every new configuration, on a demo account before going live.
- Start small on live accounts. Use the minimum lot size or a small “cent” account to confirm live behavior.
- Understand the strategy. Know whether your EA uses a stop loss, grid, martingale, or hedging logic. A strategy without a stop loss can produce long winning streaks followed by a catastrophic loss.
- Use one magic number per EA instance. This prevents EAs from interfering with each other’s trades.
- Keep your terminal updated but avoid updating in the middle of an active trading week if things are running smoothly.
- Use a VPS for reliability, and keep a record of your VPS login and setup.
- Monitor regularly. Check the Experts and Journal tabs and your account equity at least once a day. The MetaTrader mobile app is great for this, and you can configure push notifications if your EA supports them.
- Track performance independently. Connect your account to a third-party tracking site to get verified statistics on drawdown, win rate, and returns.
- Protect your credentials. Never share your master password with an EA vendor. Legitimate developers do not need it. If someone needs to view your results, share the investor (read-only) password.
- Be skeptical of unrealistic promises. No EA can guarantee profits. Claims like “100% win rate” or “double your account every month” are major red flags.
- Back up your files. Keep copies of your EA files, .set files, and license keys in a safe location.

Explore the full Top 30 Ranking of Best Forex EAs | Expert Advisors | FX Robots at BestForexEAs.com
Frequently asked questions
Q1: Can I use an MT4 Expert Advisor on MT5?
A1: No. MT4 EAs (.ex4) and MT5 EAs (.ex5) are not compatible. If you only have the MQL4 source code, a programmer can convert it to MQL5, but this is a manual process because the languages handle orders and positions differently. Ask your EA vendor whether an MT5 version is available.
Q2: Where is the Experts folder in MT4 and MT5?
A2: Open MetaTrader and click File → Open Data Folder. In MT4, go to MQL4 → Experts. In MT5, go to MQL5 → Experts. The exact path on your hard drive is inside your Windows user’s AppData directory and includes a long unique ID, which is why using the menu is the easiest method.
Q3: Why is there a sad face on my MT4 chart?
A3: A frowning face means the EA is attached but not allowed to trade. Turn on the AutoTrading button in the toolbar and make sure Allow live trading is checked in the EA’s Common tab (press F7 on the chart to open properties).
Q4: Can I run multiple Expert Advisors at the same time?
A4: Yes. You can attach one EA per chart, and you can open as many charts as your computer can handle. Each chart can run a different EA or the same EA with different settings. Use a unique magic number for every instance. If you want to run EAs on different broker accounts at the same time, install a separate MetaTrader terminal for each account.
Q5: Can I run an EA on the MetaTrader mobile app?
A5: No. The iOS and Android apps and the web terminal do not support Expert Advisors. You need the desktop terminal on Windows, Mac, or a VPS. You can, however, use the mobile app to monitor the trades your EA places.
Q6: Does my computer need to stay on for the EA to work?
A6: Yes. MetaTrader must stay open and connected for the EA to function. If you want 24/5 operation without leaving your PC on, use a forex VPS or MetaQuotes’ built-in virtual hosting.
Q7: Do I need to restart MetaTrader after installing an EA?
A7: Not always. Refreshing the Navigator is often enough. However, a restart is the most reliable option, especially if you added DLLs, libraries, or source code files.
Q8: Is it safe to allow DLL imports?
A8: Only if you trust the developer. DLLs can run any code on your computer. Download EAs that require DLLs only from reputable vendors, and never enable DLL imports globally for EAs you do not know.
Q9: What is the best timeframe and pair for my EA?
A9: Use whatever the developer recommends. EAs are typically optimized for specific symbols and timeframes, and running them elsewhere can produce very different results. Check the manual or the included .set files.
Conclusion — You Are Ready to Automate Your Trading?
Now you know exactly how to install an Expert Advisor on MT4 and MT5. The core process is simple: open the data folder, copy the .ex4 or .ex5 file into the Experts folder, refresh the Navigator, attach the EA to a chart, and switch on AutoTrading or Algo Trading. What separates successful automated traders from frustrated ones is everything that comes next: careful configuration, loading the right .set files, thorough backtesting, a demo forward test, and a stable VPS.
Take your time with each step. Test first, start small, and monitor your robot regularly. An Expert Advisor is a powerful tool, but like any tool, it delivers the best results in the hands of a trader who understands how it works.
Looking for an EA worth installing? Browse our independent Expert Advisor reviews and rankings to compare verified performance, drawdown, and risk profiles before you commit.
Check our TOP 30 RANKING of the Best Forex EAs | Expert Advisors | FX Robots.
All our reviews are based on backtests, MyFxBook verified live trading results on real accounts, demo results on test accounts, our opinions, and opinions of other traders.
To your trading success,
Michael Sommer
Best Forex EAs | Expert Advisors | FX Robots


