How to Connect MetaTrader MT4/MT5 to EdgeLedger — Complete Bridge Setup Guide
EdgeLedger Bridge is the MetaTrader plugin that automatically syncs your forex, CFD, and futures trades to EdgeLedger. Here is the complete setup guide from installation to first sync.
Crypto traders connect their exchanges to EdgeLedger with a read-only API key in under two minutes. Forex and CFD traders using MetaTrader have always had a different challenge: MT4 and MT5 do not expose a public REST API for trade history. Instead, EdgeLedger built a native solution: the EdgeLedger Bridge, a MetaTrader Expert Advisor (EA) that runs inside your MT4 or MT5 platform and sends completed trades to your EdgeLedger account automatically.
This guide covers the complete setup process from downloading the Bridge EA to viewing your first synced forex trades in EdgeLedger.
What the EdgeLedger Bridge Does
The EdgeLedger Bridge is a MetaTrader Expert Advisor (EA) that monitors your MT4 or MT5 account for closed trades and forwards them to EdgeLedger via a secure, authenticated API call. Each synced trade includes: instrument, direction (buy/sell), open time, close time, entry price, close price, lot size, commission, swap, and gross/net P&L in account currency. The Bridge runs in the background and does not affect your charting, trading, or any other MT platform functionality.
Importantly: the Bridge only reads and forwards closed trade data. It cannot place orders, modify stops, close positions, or interact with your broker in any way.
Step 1: Download the EdgeLedger Bridge EA
Log in to your EdgeLedger account and navigate to Settings → Connections → MetaTrader Bridge. Click "Download MT4 Bridge" or "Download MT5 Bridge" depending on your platform version. The download is a .ex4 file (MT4) or .ex5 file (MT5).
Step 2: Generate Your Bridge API Key
On the same Settings → Connections → MetaTrader Bridge page, click "Generate New Bridge Key." This creates a unique, encrypted API key specific to the MetaTrader Bridge connection. Copy the key to your clipboard — you will need it during EA configuration.
Step 3: Install the EA in MetaTrader
For MetaTrader 4:
- Open MT4 and go to File → Open Data Folder
- Navigate to MQL4 → Experts
- Paste the downloaded .ex4 file into this folder
- Restart MetaTrader 4 (or press F5 to refresh the Navigator panel)
- Find "EdgeLedgerBridge" in Navigator → Expert Advisors
For MetaTrader 5:
- Open MT5 and go to File → Open Data Folder
- Navigate to MQL5 → Experts
- Paste the downloaded .ex5 file into this folder
- Restart MetaTrader 5 (or press F5 to refresh the Navigator panel)
- Find "EdgeLedgerBridge" in Navigator → Expert Advisors
Step 4: Attach the EA to a Chart and Configure
- Drag the EdgeLedgerBridge EA from Navigator onto any open chart (the chart instrument does not matter — the EA monitors your entire account, not just one symbol)
- In the EA settings dialog that appears, paste your Bridge API Key from Step 2 into the "API Key" field
- Confirm "Allow DLL imports" is checked (required for the Bridge to make HTTPS calls)
- Click OK
The EA is now active. You will see "EdgeLedgerBridge" listed in the Experts tab at the bottom of the MT4/MT5 terminal window with a green status icon.
Step 5: Enable "Allow Live Trading" and "Allow Imports from DLL"
In MetaTrader, go to Tools → Options → Expert Advisors and ensure "Allow automated trading" and "Allow DLL imports" are both checked. These settings allow the Bridge to make its secure HTTPS calls to EdgeLedger's API. Without them, the EA runs but cannot send data.
Step 6: Verify the Connection
Return to EdgeLedger → Settings → Connections → MetaTrader Bridge. Within 1–2 minutes of the EA activating, the connection status should show "Connected" with a last-sync timestamp. If you have closed trades in your MT history, they will begin populating in your EdgeLedger journal within a few minutes.
If the connection shows "Pending" after 5 minutes, check: (1) the API key was pasted correctly with no extra spaces, (2) DLL imports are allowed in MT options, (3) your MT platform has a live internet connection (not running in offline mode).
Setting Up Your Forex/CFD Profile in EdgeLedger
Once trades are syncing, configure your EdgeLedger profile for forex/CFD mode:
- Go to Settings → Trading Profile → Market Mode and select "Forex/CFD"
- Set your account currency to match your MT account base currency
- If running a prop firm challenge, create a new Challenge in the Prop Firms section — configure your firm's drawdown rules, profit target, and minimum trading days
EdgeLedger will now show your MT trades in Forex/CFD mode, with forex-relevant analytics (pip values, pair performance, session analysis) rather than crypto-specific analytics.
Running Multiple MT Accounts
EdgeLedger supports multiple Bridge connections simultaneously — useful if you are running MT4 and MT5 accounts with different brokers in parallel, or managing both a demo challenge account and a live account. Each MT account gets a separate Bridge API key and appears as a separate connection in EdgeLedger, but all trades are visible in your unified analytics dashboard.