How to install an expert advisor in MT5 (PC, Mac, VPS)
An expert advisor is a file that MetaTrader 5 runs on a chart. Installing it takes a few minutes: copy the file to the right folder, attach it to a chart and turn on two switches. Here are the steps for a Windows PC, a Mac, Linux and a VPS, and why the phone app cannot do it.
1. Put the file in the Experts folder
An expert advisor you download is usually an .ex5 file, the compiled program. A .mq5 file is source code: open it in MetaEditor and compile it (F7) to get the .ex5.
- In MetaTrader 5 click File, then Open Data Folder.
- Open MQL5, then Experts, and paste the file there.
- Back in MetaTrader 5, open the Navigator (Ctrl+N), right-click Expert Advisors and click Refresh. The program now appears in the list.
Use the Data Folder that MetaTrader 5 opens, not the folder where the program is installed. With several terminals on one computer, each has its own Data Folder.
A program bought or rented on the MQL5 Market is installed differently: log in to your MQL5 account in Tools, Options, Community, then open Market, Purchased in the Toolbox and click Install.
2. Attach it to a chart and turn on the switches
- Open a chart of the symbol the program trades. Check its description for the symbol and the timeframe it expects.
- Drag the program from the Navigator onto the chart.
- In the Common tab tick Allow Algo Trading. In the Inputs tab enter any settings the program needs, such as a licence key. Click OK.
- Turn on the Algo Trading button in the toolbar (Ctrl+E). It is one switch for the whole terminal.
Some programs need one more permission in Tools, Options, Experts (Expert Advisors in some versions):
- Allow WebRequest for listed URL, for a program that checks a licence or reads data over the internet. Type the address its seller gives you. MetaTrader 5 does not let a program add itself to this list.
- Allow DLL imports, for a program that uses outside libraries. Allow it only for a program you trust: a DLL can do anything on your computer.
3. On a Mac, on Linux and on a VPS
- Mac: MetaTrader 5 for macOS runs inside Wine, which its installer sets up, and runs expert advisors with the same steps, including File, Open Data Folder. Some brokers offer their own Mac version.
- Linux: MetaTrader 5 runs through Wine; use a recent Wine version. Once the terminal runs, nothing else changes.
- Windows VPS: a rented server that stays on day and night. Connect with Remote Desktop, install MetaTrader 5 there and follow the steps above.
- The VPS built into MetaTrader 5: you set up the chart and the program on your own terminal and migrate them to the virtual server. After every change you migrate again. Check the virtual server's journal after each migration to see that the program started. Programs that use DLLs cannot run on it.
On any of these, the program trades only while the terminal runs and is connected. A laptop that goes to sleep stops it. See our budget page for what a VPS costs.
4. Why the phone app cannot run an expert advisor
The MetaTrader 5 apps for Android and iPhone cannot run expert advisors. You can log in to the same account on your phone and watch the trades the program opens on your computer or VPS. You can also close them by hand if you need to. The program itself has to run in a desktop terminal or on a VPS.
5. Check that it runs
- The program's name is in the top-right corner of the chart.
- The Journal tab of the Toolbox (Ctrl+T) shows "expert ... loaded successfully" when you attach it, and no later line saying it was removed. The Experts tab shows what the program itself writes.
- If the program has a panel on the chart, read it: it usually shows its state and any problem.
If it runs but opens no trades, go through our checklist for an EA that is not taking trades.
Installing our program
Opening Bell Algo for MT5 installs the same way. The website edition also needs the WebRequest address of our licence server and your licence key, once. The installation page shows every step and setting, and links to a video of the whole installation. To try it first, open a demo account and start the free 14-day trial, which runs only on demo accounts and needs no card.
This guide is general information about MetaTrader 5, not investment advice. Menu names can differ slightly between MetaTrader 5 versions and brokers. Trading futures and CFDs with leverage carries a high risk of loss. See our risk disclosure. The free trial is not offered in the United States or its territories. MetaTrader is a trademark of its owner, used only to describe the platform.