ForexBestRobots.com

MT4 & Expert Advisors · Forex education

How to Install a Forex Expert Advisor in MetaTrader 4

Install an MT4 Expert Advisor correctly: copy the EA, enable AutoTrading, confirm symbol and timeframe, verify logs, use a VPS and test safely on demo.

Aug 28, 202614 min readReviewed by ForexBestRobots Editorial Team
Illustrated MetaTrader 4 Open Data Folder installation stepMT4 & Expert AdvisorsPractical, risk-aware guidance

Original illustration created for ForexBestRobots.com.

A correct installation is more than placing one file in a folder. The terminal, account, symbol, timeframe, permissions and risk inputs all have to agree. Follow this sequence from a clean demo account before considering live use.

Before you install a Forex EA

A Forex Expert Advisor is a program that runs inside MetaTrader and applies coded rules to market data. Prepare the EA file, its official manual, a broker MT4 login, the required currency pair and timeframe, and any license key. Back up existing set files before changing them.

MT4 and MT5 files are not interchangeable

.ex4 and .mq4 are MT4 files and belong in MQL4/Experts. A .ex5 or .mq5 file is for MT5 and belongs in MQL5/Experts; it will not run in MT4.

Install the EA step by step

1

Open the correct MT4 Data Folder

Use File → Open Data Folder inside the exact terminal connected to the account you intend to use. This avoids copying files into an old or different broker installation.

Open the correct MT4 Data Folder illustrated in a MetaTrader 4 interface
Original interface illustration. Menu wording can vary slightly by MT4 build and broker.
2

Open MQL4 → Experts

Open MQL4, then Experts. Copy the EA’s .ex4 file there. Source files ending in .mq4 can also live there, but must compile successfully before use.

Open MQL4 → Experts illustrated in a MetaTrader 4 interface
Original interface illustration. Menu wording can vary slightly by MT4 build and broker.
3

Refresh Navigator or restart MT4

Return to MT4, open Navigator with Ctrl+N, right-click Expert Advisors and choose Refresh. If it still does not appear, close and reopen the terminal.

Refresh Navigator or restart MT4 illustrated in a MetaTrader 4 interface
Original interface illustration. Menu wording can vary slightly by MT4 build and broker.
4

Attach the EA and enable trading

Open the vendor’s required symbol and timeframe, then drag the EA onto the chart. Under Common, allow live trading. Turn on the global AutoTrading button. Enable DLL imports only when trusted documentation explicitly requires it.

Attach the EA and enable trading illustrated in a MetaTrader 4 interface
Original interface illustration. Menu wording can vary slightly by MT4 build and broker.
5

Verify the chart and logs

Confirm the EA name and status in the chart corner, then inspect Terminal → Experts and Journal. A loaded EA may wait for its entry conditions; “no trade yet” is not automatically a fault.

Verify the chart and logs illustrated in a MetaTrader 4 interface
Original interface illustration. Menu wording can vary slightly by MT4 build and broker.

Set the correct symbol, timeframe and inputs

Use the exact pair stated in the product documentation. Broker suffixes such as EURUSD.a or EURUSDm can matter if the program expects a specific symbol format. Set the stated timeframe—M15, H1 or H4, for example—because indicator calculations and new-bar logic can change with the chart period.

Correct account type and broker server
Correct symbol, including any suffix
Correct timeframe on the chart
Unique Magic Number for each instance
Lot size or risk input reviewed
Spread and trading-hour filters understood

A Magic Number lets the EA identify its own positions. Running two copies with the same number can cause management conflicts. If the vendor supplies a .set file, load it from the Inputs tab, then verify every value rather than assuming it fits your account.

How to confirm the EA is actually working

Check three layers: the chart confirms the EA is attached; the Experts log confirms initialization and signals; the Journal confirms terminal and broker events. A green connection status and a smiling EA icon are useful, but the log is the decisive evidence. The program may legitimately remain idle outside trading hours or until all entry rules align.

CheckHealthy signIf it fails
ConnectionQuotes update and no “No connection” messageReconnect to the correct broker server
PermissionsAutoTrading on; live trading allowedEnable both global and per-EA permission
InputsRisk, symbol and timeframe match the manualReload the approved set file and review values
LogsInitialization without repeating errorsUse the numeric code in the troubleshooting guide

Run the EA on a VPS without duplicating trades

A conventional Windows VPS runs the full terminal, while MetaTrader’s integrated virtual hosting migrates the active chart environment. Whichever you choose, keep only one active trading instance for the same EA, account and Magic Number. After migration, review the remote logs and confirm the local copy is not still trading.

MetaTrader virtual hosting does not support DLLs. An EA that requires a DLL needs a compatible conventional VPS or another vendor-approved setup.

Read the complete MT4 VPS setup guide →

Test on demo before live use

Run the EA long enough to observe initialization, trade handling, restarts and broker execution. Compare the actual spread, commission, symbol suffix and minimum stop distance with the vendor’s assumptions. A demo test checks technical compatibility; it does not prove future profitability or exactly reproduce live slippage.

Start with risk, not expected return

Before live use, define maximum position risk, account drawdown limits and when the EA must be paused. Never compensate for a short test by increasing lot size.

Official reference

The installation flow follows MetaTrader 4’s official Navigator and automated-trading model. See the MetaTrader 4 Navigator documentation.