# How to Track MT4 Trades Automatically - No Manual Entry

> Tracking MT4 trades manually is why most traders quit journaling. Here is the automatic approach that runs in the background without any work from you.

**Tags:** mt4, automatic-tracking, expert-advisor, trade-sync
**URL:** https://traderjournal.app/metatrader/how-to-track-mt4-trades-automatically

---


# How to Track MT4 Trades Automatically - No Manual Entry

The standard advice for tracking trades is to export your MT4 history, clean up the CSV, and import it into a spreadsheet or journal app. This works in theory. In practice, most traders do it twice and then stop.

There is a better approach that requires no manual steps after the initial setup.

---

## Why Manual MT4 Export Fails as a Routine

MT4 exports trade history through the Account History tab - right-click, Save as Report, choose dates, export. The resulting HTML or CSV file contains your trades but needs cleaning before it is usable in most tools.

Problems with this workflow:

- You have to remember to do it, ideally after every session
- The export format is messy - merged cells in HTML, inconsistent date formats in CSV
- Commission and swap are sometimes on separate rows from the trade entry, requiring manual matching
- The habit breaks the first time you are tired, distracted, or had a bad day

These are not insurmountable problems. They are friction. And friction kills habits.

---

## The Expert Advisor Approach

An Expert Advisor (EA) is a script that runs inside your MT4 terminal. Unlike strategy EAs that place and manage trades, a data-sync EA does nothing to your trading - it only reads your account data and sends it to an external endpoint.

How the sync works:

1. The EA runs on any open chart in your MT4 terminal
2. Every 30 seconds, it checks for closed trades since the last sync
3. It packages those trades as JSON and sends them via WebRequest to the journal server
4. The server deduplicates by ticket number and stores the data
5. Your journal app reflects the new trades immediately

The key properties of this approach: it is automatic, it is continuous, and it is idempotent (the same trade pushed multiple times only creates one record).

---

## What Gets Tracked

The EA sync captures every data point from your closed trades:

- Ticket number (unique identifier)
- Symbol
- Type (buy/sell)
- Open and close time
- Open and close price
- Lot size
- Stop loss and take profit at close
- Gross profit
- Commission
- Swap
- Net profit (gross - commission - swap)
- Pips

It also captures:
- Open position snapshots (for the Open Positions tab)
- Balance and equity snapshots (for the equity curve)

This is more data than most manual exports include, and it is accurate because it comes directly from the MT4 account data rather than from a user re-entering numbers.

---

## Setting Up the Sync in 10 Minutes

1. Download Trader Journal on your phone at android.traderjournal.app or ios.traderjournal.app
2. Add your MT4 account in the Accounts tab
3. Copy the API key the app generates
4. Download the EA file from the setup walkthrough
5. Place the EA file in your MT4 Experts folder (File > Open Data Folder > MQL4 > Experts)
6. Restart MT4 or press F5 in Navigator
7. Drag the EA onto any chart, configure ApiUrl and ApiKey
8. Enable WebRequest for the API endpoint in Tools > Options > Expert Advisors

After those 8 steps, the sync runs automatically every time your MT4 terminal is open. You never need to think about data export again.

---

## What Happens When MT4 Is Closed

The EA only runs when MT4 is open. Trades that happen while the terminal is closed (unusual, since you would need to be trading without MT4) are not missed - when MT4 reopens, the EA reads from the last sync timestamp and pushes any trades that occurred since then.

If you trade on MT4 mobile and close desktop MT4, trades placed on mobile appear in your journal the next time desktop MT4 opens with the EA running.

---

## After Setup

Once the sync is running, your only task is adding notes, tags, and screenshots to each trade. The data is already there. Open the app after a session, flip through your trades, write your notes while the context is fresh, and close the app.

That is the entire workflow. No exports, no imports, no cleaning.