You bought an EA, unzipped the download and found an .ex4 file, two indicators, a .dll, a .set file and a PDF. The PDF says “copy the files to the correct folders”. Which folders?
Put a file in the wrong place and MetaTrader does not complain. The EA just never appears in the Navigator, or it appears and then fails because the indicator it calls cannot be found. On a new VPS, where you are setting everything up from scratch, getting the folders right the first time saves a lot of head-scratching.
This post walks through every folder in the MQL4 and MQL5 directories, what belongs in each, and how to check your EA is loading from the right place.
Start in the Right Data Folder
Every MetaTrader terminal has its own data folder, and that is where the MQL4 or MQL5 directory lives. It is usually not the folder under Program Files where the terminal is installed.
The only reliable way to find it is from inside the terminal:
- Open the terminal you want to add files to.
- Click File, then Open Data Folder.
- Open
MQL4(MetaTrader 4) orMQL5(MetaTrader 5).
If you run several terminals, each one has its own data folder. Copying an EA into one terminal’s folder does nothing for the others. For why the data folder sits where it does, and how to keep it beside the program instead, see MT4 and MT5 portable mode on a VPS.
⚠️ Warning: Do not copy files into the
MQL4orMQL5folder underProgram Filesunless File, Open Data Folder actually takes you there. In a normal install, the terminal does not read EAs from that location.
What Goes in Each Folder
Both platforms use almost the same layout. Here is what each folder is for:
- Experts: Expert Advisors. The
.ex4(MT4) or.ex5(MT5) compiled files, and their.mq4or.mq5source code if you have it. - Indicators: custom indicators,
.ex4or.ex5. This includes indicators an EA calls internally. - Scripts: scripts that run once on a chart and stop, such as “close all trades” tools.
- Include:
.mqhheader files used only when compiling source code. You need these only if you compile an EA yourself. - Libraries:
.dllfiles and compiled MQL libraries that an EA imports. - Files: data files that EAs read and write, such as CSV exports, settings files or news data.
- Presets:
.setfiles with saved EA inputs. See EA set files and presets on a VPS. - Images: image files used by some indicators and EAs.
- Logs: the EA and script log for each day. See reading MT4 and MT5 log files on a VPS.
MetaTrader 5 also has a Services folder for programs that run in the background without a chart. Most traders never use it.

📊 Key Stat:
.ex4files only run in MetaTrader 4 and.ex5files only run in MetaTrader 5. No folder change makes an MT4 EA run in MT5.
Templates and Profiles Live Elsewhere
Chart templates and profiles are not EAs, so they do not sit with them. In MT4, look for the templates and profiles folders at the top of the data folder. For both platforms, see MT4 and MT5 templates and profiles on a VPS.
Reading the Vendor’s Download
Most EA downloads follow the folder names, which makes the job easier:
- If the zip already contains an
MQL4orMQL5folder, copy its contents into the matching folder in your data folder and let Windows merge them. - If it is a loose set of files, sort them by extension:
.ex4/.ex5EAs to Experts, indicator files to Indicators,.dllto Libraries,.setto Presets,.csvor data files to Files. - If you cannot tell an EA from an indicator by name, the vendor’s instructions should say. When in doubt, ask the vendor rather than guessing.
💡 Tip: Subfolders are fine. You can keep each vendor’s EAs in
Experts\VendorName\. The Navigator shows them in a matching subfolder. Some EAs expect their indicators at a fixed path, though, so follow the vendor’s layout if it gives one.
Making the Terminal See New Files
Copying a file does not always refresh the Navigator straight away.
- Right-click in the Navigator and choose Refresh.
- If the file still does not show, close the terminal with File, Exit and start it again.
- Check the file extension. Windows hides known extensions by default, so
MyEA.ex4.zipcan look likeMyEA.ex4. Turn on file name extensions in File Explorer’s View menu. - Check the file landed in the right terminal’s data folder.
If an EA appears but shows a grey or crossed icon, or will not attach, check the Experts and Journal tabs for the reason.

DLLs Need Permission Too
A .dll in the Libraries folder is not enough on its own. The terminal also has to allow DLL imports, either globally in Tools, Options, Expert Advisors, or in the EA’s own settings when you attach it. Some EAs also need web addresses added to the WebRequest list.
See EA DLL imports and WebRequest permissions on a VPS for exactly what to tick, and the security trade-offs.
Common Folder Mistakes
- EA in the Indicators folder (or the other way round). It loads in the wrong part of the Navigator, or not at all.
- Missing companion indicator. The EA attaches, then logs an error that it cannot load an indicator. Put the indicator in Indicators, with the exact file name the EA expects.
- Copied to the wrong terminal. You have three terminals and put the file in the data folder of one you do not use.
- Old version still loading. A previous
.ex4with the same name is in a subfolder and the Navigator shows that one. Remove old versions when you update. - Source only, no compiled file. You copied a
.mq4or.mq5but no.ex4or.ex5. Open it in MetaEditor and compile, or ask the vendor for the compiled file.
✅ Best Practice: Keep the original vendor zip files in a folder on the VPS desktop, such as
EA Downloads. If a file goes missing or an update breaks something, you can put the known-good version back in seconds.
Updating an EA Safely
When the vendor sends a new version, replace the file rather than adding a second copy:
- Remove the EA from its charts, or close the terminal.
- Rename the old file, for example to
MyEA_old.ex4, and move it out ofExpertsinto a backup folder. - Copy the new file into
Expertswith the vendor’s file name. - Refresh the Navigator, attach the new version and reload your
.setfile.
Keeping only one version in the folder means you always know which one is running.
Moving Your Setup From a PC to the VPS
When you move to a VPS, copy the contents of your PC’s MQL4 or MQL5 folder into the same folder on the VPS terminal, with both terminals closed. That brings EAs, indicators, presets and data files across together. See migrate your EA to FXVPS for the full process, including licences that are tied to a machine.
Recommended FXVPS Plan
Choose by how many terminals and EAs you run:
- Core ($29/mo, 2GB RAM, 1 vCPU): one or two terminals.
- Pro ($39/mo, 4GB RAM, 2 vCPU): several terminals across a few accounts.
- Scaling ($79/mo, 8GB RAM, 4 vCPU): many terminals, prop firm accounts and copiers.
See the pricing page, or set up your folders on the $2.99 7-day trial.
Why FXVPS for EA Traders
- A full Windows desktop, so you can open data folders, unzip downloads and copy files exactly as you would on your own PC.
- Easy file transfer over Remote Desktop from Windows or Mac.
- Locations near your broker in London, New York, Tokyo, Hong Kong and more than 15 others.
- Dedicated resources for terminals that run around the clock.
Frequently Asked Questions
Where do I put an EA in MetaTrader 4?
In the MQL4\Experts folder inside the terminal’s data folder. Open it with File, Open Data Folder.
Where do indicators go?
In MQL4\Indicators or MQL5\Indicators, in the data folder of the terminal that uses them.
Where do DLL files go?
In the Libraries folder. You also need to allow DLL imports in the terminal or the EA’s settings.
Why does my EA not appear in the Navigator?
It is usually in the wrong folder, in another terminal’s data folder, or the Navigator needs refreshing. Right-click the Navigator and choose Refresh, or restart the terminal.
Can I use an MT4 EA in MT5?
No. .ex4 files run only in MT4 and .ex5 files only in MT5. You need a version built for MT5.