MT4 EA Cannot Load? Causes, Checks, and Fixes
By FXNook Lab team
If an MT4 EA cannot load, first identify whether it is missing from Navigator, failing to compile, or producing an error when you attach it to a chart. The usual fixes are to put the EA in the active terminal’s MQL4/Experts folder, compile its .mq4 source in MetaEditor, or resolve a compatibility or permission issue. An EA that appears on the chart but does not open trades has loaded; diagnose that separately.
Identify what “cannot load” means
These symptoms happen at different stages. A missing EA has not been found by the terminal, a compile error means MetaEditor could not build the source, and an attach or initialization error means MT4 found the EA but could not start it correctly. Start with the symptom you can see rather than changing several settings at once.
| What you see | Likely stage | First check |
|---|---|---|
| The EA is absent from Navigator | File location, type, or Navigator refresh | Open the active terminal’s data folder and inspect MQL4/Experts. |
| MetaEditor reports errors after Compile | Source code did not compile | Read the first error and its line number in the Errors tab. |
| The EA is listed but an error appears when you attach it | File compatibility or initialization | Read the Experts and Journal tabs for the exact message. |
| The EA name appears on the chart, but no order is placed | Trading logic, permissions, or broker conditions | Confirm it initialized, then troubleshoot its trading behavior separately. |
Put the EA in the active MT4 data folder
MT4 can have more than one installation on the same computer. Copying an EA into the data folder of a different terminal is a common reason it does not appear, even when the file is in a folder named MQL4/Experts. Open the folder from the exact MT4 window where you expect to use the EA.
- In MT4, select File > Open Data Folder.
- Open
MQL4, then openExperts. - Copy the EA’s
.mq4source file, its compiled.ex4file, or both into that folder. If you have source code, keeping it there lets you compile it in the same terminal environment. - Return to MT4. In Navigator, right-click Expert Advisors and choose Refresh. If it still does not appear, restart that terminal and look again.
MT4 runs compiled .ex4 files. When you compile an .mq4 source file in MetaEditor, the compiler normally creates the corresponding .ex4 file beside the source. Check that the file is actually in the active terminal’s Experts folder and that Windows has not left it with an unintended extension such as .mq4.txt.
Folder placement also depends on the kind of program. An EA belongs in MQL4/Experts, while a custom indicator belongs in MQL4/Indicators. An indicator will not appear in Navigator’s Expert Advisors list simply because it was copied into the EA folder; identify the program type before moving files.
Compile the source in MetaEditor
If you have an .mq4 file, open it from the terminal’s data folder or use MetaEditor’s File menu to open it. Press Compile, then read the result in MetaEditor’s Errors tab. Errors need to be resolved before MT4 can use a new compiled version of that source.
Start with the first reported error, not the last one. A missing include, undeclared identifier, incorrect function parameters, or unbalanced bracket can cause several later messages, so fixing every line independently may hide the original cause. Warnings are different from compile errors; read their text and determine whether they point to behavior that matters for this EA.
| Compile outcome | What it means | Next step |
|---|---|---|
| One or more errors are listed | MetaEditor did not produce a usable new build from this source. | Fix the first error and compile again. Keep the full error text and line number if you need help diagnosing it. |
No errors, but no expected .ex4 is visible | The source or output may be in another directory, or you may be compiling a different file from the one in the terminal folder. | Use MetaEditor’s file path or the terminal’s data folder to locate the source and generated output. Then refresh Navigator. |
| Compilation succeeds and the EA appears | The source compiled, but loading or operation has not yet been proven. | Attach it to a chart and read the Experts and Journal tabs for initialization messages. |
Some source files need other files, such as included .mqh files. If MetaEditor reports that an include file cannot be found, make sure the required file is available in the expected MQL4/Include location or in the folder used by that source. Do not replace a missing dependency with an unrelated file just to make compilation proceed.
If the errors are difficult to trace, FXNook Lab’s MQL4/MQL5 error-fixing page accepts code with or without MetaEditor errors. It compiles the code, groups related errors by cause, and checks the result by compiling again. The output is a new version, so you can compare it with the original.
Check the platform and file compatibility
MT4 and MT5 use different program formats and trading interfaces. An MT5 .ex5 file is not an MT4 EA, and an MT5 .mq5 source file cannot be made into an MT4 EA by renaming its extension. For MT4, obtain the MT4 version of the EA, usually supplied as an .ex4 file or as .mq4 source that can be compiled in MetaEditor.
A source file may also use functions or assumptions that do not match the terminal it is being compiled for. For example, an EA written with MT5’s position model is not automatically equivalent to an MT4 EA built around orders. Converting between platforms requires changes to the trading code, not just a file rename; FXNook Lab has separate MT5-to-MT4 and MT4-to-MT5 conversion pages.
If MT4 reports an invalid EX4 file, verify that the file really is an MT4 EA, not an MT5 binary or an indicator, and that it was not renamed or damaged during copying. A compiled file may also be incompatible with the terminal build or may need to be recompiled from its source for the installed MT4 environment. If you did not build the file, ask its author or provider for a current MT4 version; source code is needed if recompilation is required.
To identify the terminal version, use Help > About in MT4. When you have multiple installations, confirm you are compiling and testing in the same terminal whose data folder contains the EA. A successful compile in one installation does not put the output into another installation’s folder.
Attach the EA and set permissions
Once the EA is visible in Navigator, open the chart where you want to run it and drag the EA onto that chart, or double-click its name. In the EA settings window, review the Common tab and select Allow live trading if the EA needs to send or manage orders. Then select OK to attach it.
MT4 has more than one automated-trading control. The AutoTrading button on the toolbar must be enabled for automated trading, and the terminal’s Tools > Options > Expert Advisors settings must allow automated trading. If an EA relies on a permission or feature that is disabled, its operation may be restricted or its initialization may report a problem.
These settings affect whether an EA can operate; they do not determine whether its file appears in Navigator. If you are still trying to make a missing EA show up, return to the file location and program type checks rather than toggling trading permissions. An EA can also attach successfully while automated trading is disabled, so use the chart and log messages to distinguish attachment from permission to trade.
Read Experts and Journal for the exact failure
Open MT4’s Terminal panel, usually with Ctrl+T, and select the Experts and Journal tabs. Experts is useful for messages from EAs and indicators; Journal records terminal events, including loading and trading-permission information. Find the entry at the time you tried to attach the EA and read the complete line, not just a fragment.
| Message or symptom | What it points to | Practical next check |
|---|---|---|
| Invalid EX4 or the EA cannot be loaded | Wrong program or platform, a damaged file, or a compiled file that the terminal cannot use. | Verify the extension and program type, then obtain or compile a compatible MT4 build. |
| Initialization failed | The EA was found, but its startup code did not complete successfully. | Read the surrounding Experts messages and review any required inputs, files, permissions, or symbol conditions. |
| Automated trading or trading is disabled | A terminal-wide or EA-level setting is preventing order operations. | Review AutoTrading, Tools > Options > Expert Advisors, and the EA’s Common settings. |
| The EA is attached, with no load error, but no trade follows | The EA may be waiting for its entry rules, or a separate trading condition may be blocking orders. | Check its inputs and strategy logic, then inspect any order error in the logs. |
The wording varies by terminal build and EA, so treat the actual log line as the evidence. An initialization error is not automatically a file-format problem; it can come from the EA’s own startup checks or a missing requirement. If the message is unclear, save the exact text along with the MT4 build and the steps that produced it.
Verify that the EA loaded before investigating trades
After attachment, look for the EA’s name on the chart and confirm that MT4 has not disabled it. The chart icon and terminal messages can help show whether it is active, but the Experts tab is the better place to confirm that initialization completed without an error. If the EA immediately reports a problem, solve that first rather than judging it by whether it opens a trade.
An EA that attaches but remains idle may be doing exactly what its rules specify. It could be waiting for a new bar, a signal, a time window, or a market condition; it could also be blocked by its inputs, permissions, or broker constraints. For the next set of checks, see MT4 EA Not Opening Trades: Checks, Causes and Fixes.
A clean compile only shows that MetaEditor accepted the source. It does not prove that the EA initializes, reaches its order logic, or can place an order under the current account and broker conditions. Use the logs and a controlled test in the MT4 Strategy Tester when you need to separate startup problems from trading behavior; tested results do not guarantee future results.
Avoid changes that make diagnosis harder
- Do not keep copying the same file into guessed folders. Open the data folder from the terminal you are using and make one location change at a time.
- Do not treat an indicator as an EA. Check the program type and put it in the matching folder.
- Do not use an MT5 binary in MT4 or rename
.ex5to.ex4. Get the correct platform version. - Do not treat “no trades” as “cannot load.” Confirm the EA is attached and initialized before investigating its entry conditions.
- After each change, refresh Navigator or restart MT4 if needed, try the same attachment step again, and read the new log entry.
Work through the stages in order: correct folder, correct file type, successful compilation if you have source, compatible MT4 build, attachment permissions, then the terminal logs. Your next practical step is to reproduce the failure once and capture the exact Experts or Journal message; that message usually narrows the fix to the right stage.
Questions
Where do I put an EA file in MT4?
In the MT4 terminal where you plan to use it, choose File > Open Data Folder, then open MQL4/Experts. Copy the MT4 EA’s .ex4 file or its .mq4 source there, refresh Expert Advisors in Navigator, and compile the source in MetaEditor if needed.
Why does my EA not appear in the MT4 Navigator?
The file may be in a different MT4 installation’s data folder, in the wrong MQL4 subfolder, or it may be an indicator rather than an EA. Confirm the program type and extension, place it in the active terminal’s MQL4/Experts folder, then refresh Navigator or restart MT4.
Why does MT4 say invalid EX4 file?
The file may not be a compatible MT4 EA, may be damaged, or may have been compiled for a terminal environment that cannot use it. Check that it is an MT4 .ex4 file and ask its provider for a current build or the .mq4 source so it can be compiled for your terminal.
Why can I attach an EA but it does not trade?
Attaching means MT4 found the EA, but it does not prove that its entry rules are met or that trading is allowed. Read Experts and Journal, review the EA inputs and AutoTrading permissions, and then diagnose its trading logic separately from its loading.