How do I add an Expert Advisor in MetaTrader 4?
In the terminal, click File, then Open Data Folder. The data folder opens. Go to the MQL4 directory and then to Experts. Copy in the file with the extension .ex4 or .mq4. Then restart the terminal or right-click Refresh in the Navigator window. The Expert Advisor then appears under Expert Advisors and can be dragged onto a chart.
How do I add an Expert Advisor in MetaTrader 5?
The procedure is the same, only the directory has a different name: File, Open Data Folder, then MQL5 and Experts. Copy in the file, restart the terminal or refresh the Navigator. Indicators belong in MQL5 and Indicators, scripts in MQL5 and Scripts.
Why isn't my Expert Advisor trading?
In the vast majority of cases it is one of these five causes: the Algo Trading button in the toolbar is not enabled. Or the permission for automated trading is not ticked in the Expert Advisor's properties. Or the icon at the top right of the chart doesn't show a blue hat (MetaTrader 5) or a smiling face (MetaTrader 4). Or the market is closed. Or the strategy's trading conditions simply haven't been met yet. The Experts log usually states the exact reason.
What does the icon at the top right of the chart mean?
In MetaTrader 5, a blue hat shows that the Expert Advisor is running and allowed to trade; in MetaTrader 4 it is a smiling face. A grey hat or a sad face means: it is loaded but not allowed to trade — usually because the Algo Trading button is off or the permission is missing in the properties. If no icon appears at all, the Expert Advisor was not loaded.
Where can I find the log files?
At the bottom of the terminal there are the Experts and Journal tabs, and during tests also Results. The Experts tab contains the output of the Expert Advisor itself, the Journal the terminal's messages including connection and order errors. As files, both are stored in the data folder under MQL4 or MQL5 and then Logs, as well as directly under Logs.
Do I have to compile the file?
Only if you received an .mq4 or .mq5 file, i.e. the source code. Open it in MetaEditor and choose Compile; this creates the executable .ex4 or .ex5 file. If you already have an .ex4 or .ex5 file, this step is not needed. From us you always receive both.
What is the difference between .mq4, .ex4, .mq5 and .ex5?
The files with mq are the readable source code, those with ex the executable program generated from it. Only the ex file is executed; only the mq file can be changed. If you only receive an ex file, you can neither adapt the system nor have it adapted by someone else — which is why the source code belongs in every delivery.
Does the Expert Advisor keep running when I close the terminal?
No. An Expert Advisor runs inside the terminal; if the terminal is closed, it doesn't trade. Continuous operation requires a server that runs around the clock — either a virtual server or the hosting service built into MetaTrader. A working computer that goes into sleep mode at night or restarts after a system update is unsuitable.
Does an Expert Advisor run in the MetaTrader app on my phone?
No. The MetaTrader apps for Android and iOS do not run Expert Advisors — this applies equally to MetaTrader 5 and MetaTrader 4. The app is suitable for monitoring the positions that an Expert Advisor has opened on a computer or server. The Expert Advisor itself runs exclusively in the desktop terminal under Windows or on a virtual server.
Does an Expert Advisor run in the MetaTrader web terminal?
No. The web terminal in the browser does not run Expert Advisors, custom indicators or scripts either. Automated trading requires the desktop terminal.
How do I open an .mq5 file?
An .mq5 file is the readable source code of a program for MetaTrader 5. It is opened in MetaEditor, which comes with MetaTrader: press F4 in the terminal or start the MetaQuotes Language Editor from the Tools menu. There you can read and change the source code; F7 compiles it, which creates the executable .ex5 file. The same applies to .mq4 files in MetaTrader 4's MetaEditor.
How much does MetaTrader 5 cost?
The platform itself is free. MetaTrader 5 is provided by the broker or by the maker, MetaQuotes, without a licence fee. Costs arise elsewhere: through spreads, commissions and overnight swaps with the broker, possibly for a virtual server for continuous operation, and for purchased or custom-programmed Expert Advisors and indicators.
How do I install an indicator in MetaTrader 5?
Like an Expert Advisor, just in a different folder: in the terminal, open the data folder via File, then go to MQL5 and then Indicators and copy in the .ex5 or .mq5 file. Then right-click Refresh under Indicators in the Navigator or restart the terminal. The indicator can then be dragged onto a chart. If only the .mq5 file is available, compile it first in MetaEditor with F7.
Why is my Expert Advisor not showing in the Navigator?
Usually the file is in the wrong folder: not the program folder, but the data folder shown by File and Open Data Folder, and there under MQL5 and Experts. Other causes: the file belongs to the other MetaTrader version (.ex4 instead of .ex5), only the source code is there and it did not compile without errors, the Navigator was not refreshed, or the terminal is older than the file. Systems bought in the MQL5 Market are listed in the Navigator under Market.
How do I install an Expert Advisor on a Mac?
As on Windows: copy the file into the MQL5 and Experts folder and restart MetaTrader. If File and Open Data Folder does not open the folder, use Go and Go to Folder in Finder and enter ~/Library/Application Support/net.metaquotes.wine.metatrader5/drive_c/Program Files/MetaTrader 5/MQL5/Experts. According to MetaQuotes, this is the default path of the Mac installer.
How do I move my Expert Advisor to a new broker?
In the new broker's terminal, open the data folder via File and copy the .ex5 or .ex4 file, with the source code if you have it, into MQL5 or MQL4 and Experts; saved settings are .set files under Presets. Then check symbol names, decimal places, minimum lot size and account type, because they differ between brokers. Run it on a demo account before the live account.
Can I get the source code back from an .ex5 file?
No. An .ex5 or .ex4 file is compiled; readable source code cannot be recovered from it reliably, and the licence terms of purchased systems usually prohibit it. Without the source code, the only option is a new development based on a description of the behaviour. That is why the source code belongs in every delivery.