# MT4 Magic Number - What It Is and Why It Matters

> The MT4 magic number identifies which EA opened a trade. For journaling, it helps filter and analyze automated vs manual trades separately.

**Tags:** mt4, magic-number, ea, trade-filtering
**URL:** https://traderjournal.app/metatrader/mt4-magic-number-what-it-is

---


# MT4 Magic Number - What It Is and Why It Matters

If you use Expert Advisors in MT4 alongside manual trading, the magic number becomes an important field for separating and analyzing your different types of trade activity.

---

## What Is a Magic Number

In MT4, when an EA opens a trade, it can assign an arbitrary integer identifier to that trade. This integer is the magic number. It is stored with the trade record and visible in your trade history.

Manual trades (opened directly through the MT4 interface, not by an EA) have a magic number of 0.

EA-opened trades have whatever magic number the EA developer chose. If you run two different EAs, they should use different magic numbers so you can tell which EA opened each trade.

---

## Why Magic Numbers Matter for Journaling

If you run one or more automated strategies alongside your manual trading, all the trades appear in the same account history. Without the magic number, you cannot tell which trade was opened by your scalping EA, which was opened by your trend EA, and which was opened manually.

For accurate performance analysis, you need to separate these. The magic number is the field that makes this separation possible.

---

## Practical Magic Number Use Cases

**Separating automated from manual trades:**
Filter your journal for trades with magic number = 0 (manual) vs any other number (EA-opened). This lets you evaluate your manual trading performance independently from your automated strategy performance.

**Comparing two EAs:**
If you run EA-A with magic number 1001 and EA-B with magic number 1002, filter by each to see which strategy is performing better in live conditions.

**Blended analysis:**
You may also want the combined view - all trades together - to see the overall account performance. Having the filtering capability does not prevent combined analysis.

---

## How Trader Journal Handles Magic Numbers

Trader Journal captures the magic number from each trade via the EA sync. It is stored with the trade record. Future analytics enhancements may include magic-number-based filtering directly in the reports.

For now, if you want to separate your magic number groups, you can note the magic number in the trade's tag field when reviewing. "EA-1001" or "manual" as a tag lets you filter by group in your current analytics.

---

## Note for Manual Traders

If you trade exclusively manually (never use automated EAs), magic numbers are irrelevant to your journaling workflow. All your trades will show magic number 0 and the field is not meaningful for your analysis.

Download Trader Journal at android.traderjournal.app or ios.traderjournal.app.