# How to Install an EA on MT5 - Step by Step

> Installing an Expert Advisor on MetaTrader 5 is slightly different from MT4. Here is the complete step-by-step process.

**Tags:** mt5, expert-advisor, installation, setup, mql5
**URL:** https://traderjournal.app/metatrader/how-to-install-ea-on-mt5

---


# How to Install an EA on MT5 - Step by Step

The MT5 EA installation process is similar to MT4 but with different folder paths and a few MT5-specific settings. Here is the complete walkthrough.

---

## What You Need

- MetaTrader 5 installed on your computer
- The EA file (.ex5 format) downloaded to your computer
- Your MT5 account logged in

---

## Step 1 - Open the MT5 Data Folder

In MetaTrader 5: File > Open Data Folder

This opens the data directory for your MT5 installation.

---

## Step 2 - Navigate to MQL5 > Experts

Inside the data folder: MQL5 > Experts

Copy your .ex5 file into this folder.

If you also have the .mq5 source file, you can copy it here too. MT5 will compile it automatically if needed. Only the .ex5 is required to run.

---

## Step 3 - Refresh the Navigator in MT5

In MT5, open the Navigator (Ctrl+N or View > Navigator).

Expand the Expert Advisors section. Right-click on it and select Refresh.

Your new EA should appear in the list. If it does not, try restarting MT5.

---

## Step 4 - Enable Algorithmic Trading

In the MT5 toolbar, look for the "Algo Trading" button (or "Automated Trading" depending on your MT5 version). It should show green (enabled).

If it is showing red or disabled, click it to enable. EAs require this setting to run.

---

## Step 5 - Attach the EA to a Chart

Drag the EA from Navigator > Expert Advisors onto any open chart. A properties dialog appears.

In the Common tab:
- Check "Allow algo trading" to ensure this specific EA is permitted to run
- You can leave other options at defaults for a sync EA

In the Inputs tab, configure:
- **ApiUrl** - from your Trader Journal app setup walkthrough
- **ApiKey** - your API key from the app
- **PushIntervalSec** - 30 (default)

Click OK.

---

## Step 6 - Configure WebRequest in MT5

In MT5: Tools > Options > Expert Advisors tab

- Check "Allow automated trading"
- Check "Allow WebRequest for listed URL"
- Add the Trader Journal API endpoint URL to the list

This step is required. Without the URL whitelist, the EA cannot send data to the journal server.

---

## Checking the Connection

Open the MT5 Toolbox (Ctrl+T) and go to the Experts tab. After the first sync cycle (30 seconds), you should see log messages from the EA showing successful pushes.

In your Trader Journal app, pull to refresh. Your balance should appear within 30 seconds.

---

## MT5-Specific Note: OnTradeTransaction

The Trader Journal MT5 EA uses MT5's OnTradeTransaction handler for near-realtime sync when trades close. This fires immediately on trade events, meaning trades typically appear in your journal within seconds rather than at the next poll interval.

This is a feature specific to MT5 - MT4 uses the 30-second polling approach only.

---

## Common Issues

**EA showing error in Experts tab:**
Check that "Allow algo trading" is enabled both globally (toolbar) and for the specific EA (Common tab in properties).

**WebRequest failing:**
Ensure the exact URL from the setup walkthrough is in the WebRequest allowed list. Even a trailing slash difference can cause it to fail.

**EA compiled from source (.mq5) instead of running .ex5:**
If MT5 is trying to compile the source and failing, check that the MQL5 compiler can access the internet (if needed) or provide only the pre-compiled .ex5.