Skip to content

Export to MT4 / MT5

When you are done building your EA, you export it to MetaTrader. EA Builder Pro generates the file for you: a compiled ex4 / ex5 file, or the mql source code if you are subscribed.

In short:

  • Click Export to MetaTrader 4 or Export to MetaTrader 5 in the EA editor and choose what to download.
  • The file is always for the platform of your EA: an MT4 EA gives an ex4 / mq4 file, an MT5 EA an ex5 / mq5 file.
  • Copy the file to the Experts folder of MetaTrader, and attach the EA to a chart.
  1. Open your EA in the EA editor.
  2. Click Export to MetaTrader 4 or Export to MetaTrader 5 in the app bar. The export menu opens; on a phone it opens at the bottom of the screen.
  3. Choose Compiled EA, MQL Source code or Indicators. The download begins.
Export menu with Compiled EA (.ex4), MQL Source code (.mq4), Indicators, Run on VPS and How to installExport menu with Compiled EA (.ex4), MQL Source code (.mq4), Indicators, Run on VPS and How to install
The export menu of an MT4 EA that uses a custom indicator.

To export an EA for the other platform, first switch the platform with the platform button (MT4 / MT5) in the app bar.

The ex format is MetaTrader’s compiled format: ready to run in MetaTrader. You don’t need to compile the source code, but you don’t get the mql source code either.

  • Pro: the EA has all its input variables, so you can change its settings in MetaTrader (Inputs tab).
  • Free: the EA has no input variables. Before the download, the MetaTrader inputs dialog tells you that you are exporting without inputs: click Export without inputs to go on, or Upgrade.

The source code of your EA. You can read it, change it and compile it in MetaEditor (MetaTrader’s code editor). Export MQL needs a Pro subscription: on the free plan it shows a Pro badge.

The custom indicators that your EA uses, the ones you uploaded yourself. The EA needs them in MetaTrader to run. The option is greyed out when the EA uses no custom indicators (“This EA uses no custom indicators”).

On the free plan you can export a limited number of EAs per day. The export menu shows how many you have left, for example 8 of 10 exports left today. When none are left, an upgrade dialog opens. With Pro you have unlimited exports.

  1. In MetaTrader, click File > Open Data Folder.
  2. Copy the EA file to MQL4/Experts (MT4) or MQL5/Experts (MT5). Copy custom indicators to MQL4/Indicators or MQL5/Indicators.
  3. Exported the mql source code? Open it in MetaEditor and compile it.
  4. In the Navigator panel, right-click Expert Advisors and click Refresh. Your EA is in the list.
  5. Drag the EA onto a chart to run it, or select it in the Strategy Tester to backtest it in MetaTrader.

The menu item How to install opens the step-by-step tutorial Run your first EA: allow automated trading, run a backtest in MetaTrader and attach the EA to a demo or live account.

For more information about MetaTrader, go to MetaTrader 4 or MetaTrader 5.

An EA only trades while MetaTrader is running. To trade 24 hours a day without leaving your computer on, run MetaTrader on a VPS (virtual private server). Run on VPS in the export menu explains how: Run your EA on a VPS.

MetaTrader is a registered trademark of MetaQuotes Ltd. EA Builder Pro is not affiliated with MetaQuotes.