Expert Advisor Statistics by Magic Number MT4

You run several EAs on one account, plus a few trades by hand. The balance shows the total. It doesn't show which EA earns the money and which one gives it back.

Magic Stats reads the account history of your MT4 account and shows one row per magic number: how each EA has actually performed, in any period you choose. It is an indicator, so it sits on a chart next to any EA. It never opens, changes or closes a trade.

What you see for every EA (magic number)

  • Name and symbols traded
  • Trades, win %, net profit (profit + swap + commission), in the account currency
  • Profit factor, average trade
  • Max drawdown of the EA's closed-trade equity curve (in money) and recovery factor (net / max drawdown)
  • Last trade date, open orders now and their floating P/L
  • A small equity line per row (up to 20 points), green or red
  • A Total account row: all trades of the period as one combined curve

Profit in green, loss in red; PF of 1.5 or more green, below 1.0 red. Magic 0 is shown as Manual (terminal, mobile app, tools without a magic).

Periods and sorting

  • Tabs: TODAY, WEEK (from Monday), MONTH, YEAR, ALL history, CUSTOM (from a date you set). All in broker server time.
  • Click a column header to sort by Trades, Win %, Net, PF or Max DD. Click again to switch between descending and ascending.
  • Optional: split every magic by symbol, one row per magic and symbol.
  • Name map: 12345=TrendEA;777=IndexBot turns numbers into names. Without it, a row takes the most frequent order comment of the EA (broker markers such as [sl] or [tp] removed), otherwise "Magic 12345".

How trades are counted on MT4

  • Each closed market order (buy or sell) in the account history is one trade. Its result is profit + swap + commission.
  • The magic number is the order's magic number. MT4 keeps it when an order is closed by stop loss or take profit, so an EA's losing trades don't end up under "Manual".
  • Partial closes: MT4 continues the rest of a partly closed order under a new ticket ("from #..."). Magic Stats joins these pieces into one trade, with the magic number and open time of the original order. It is counted when the last piece closes, in the period of that final close.
  • Close by: both orders count as trades.
  • Deleted or expired pending orders, deposits, withdrawals and credit never count as trades.
  • Max drawdown is closed-trade drawdown: peak to trough of the equity curve built from closed trades, starting at 0 at the period start. Floating P/L is not in it; it has its own column. The panel says so in its coverage line.

CSV export

One click writes the current tab, in the current sort order, to MQL4\Files\MagicStats_<account>_<period>.csv: one line per row plus the total, with gross profit, gross loss, wins and losses as extra columns. Separator ;, decimal separator dot or comma (input, comma for European Excel), UTF-8.

Next to any EA, and private

  • An indicator with no buffers: put it on any chart, any symbol, any timeframe, also next to an EA.
  • Read-only. It never trades.
  • Nothing is sent anywhere: no internet functions, no DLL. The only file it writes is the CSV, and only when you click EXPORT CSV.
  • Large histories are read in slices of 2,000 orders, so the chart stays responsive. After that, only new orders are processed (default: every 10 seconds), and a later change in the history triggers a rebuild.

Important on MT4: show the whole history

An MT4 indicator only sees what the Account History tab of the terminal holds. Open the Terminal window (Ctrl+T) → Account History → right-click → All History. If the numbers look too small or the first trade is too recent, this setting is almost always the reason. The panel shows a reminder.

Free

Free and fully working: no time limit, no trial mode, no nag screens, no adverts inside the program.

Limitations

  • Only closed trades count. Profit already realised by a partial close appears when the rest of the order is closed.
  • Max drawdown does not include the drawdown while a trade was open. The intra-trade drawdown can be much larger.
  • Floating P/L is profit + swap of the open orders; commission is added to the trade when it closes.
  • Several Magic Stats instances can run on one chart, but they are drawn at the same place unless you give each one its own Panel X / Panel Y. In the Strategy Tester Magic Stats only sees the tester's own orders.
  • This is the MetaTrader 4 version. A MetaTrader 5 version is available separately.

Past results shown by Magic Stats describe your own history only and do not predict future performance. Trading leveraged products carries a high risk of loss.

More from author
Drawdown Minimizer for MetaTrader 4 - your EAs pay in, old losers get paid off. This utility runs next to your other Expert Advisors and never opens a trade. It keeps a savings book of the net realized profit of your whole account and uses it to close the oldest losing positions of the EAs you choose - slice by slice, oldest first. WHY IT EXISTS Made by traders, for traders. One of our grid EAs got stuck in drawdown for months. The old positions did not come back, and they paid swap every single
Bonus: buy Dawnbreak and get LongRunner or Second Wind for free. Send me a private message after your purchase. Dawnbreak trades the breakout of a fixed session range on MetaTrader 5. One trade per day and chart, a stop loss on every trade, no grid, no martingale, no averaging. Recommended for gold (XAUUSD) and the DAX (DE40) . Updates are free for every buyer. Not sure yet? Download the free demo and run it in the Strategy Tester on your own broker's data. Full guide with all set files: mql5.co
Drawdown Minimizer for MetaTrader 5 - your EAs pay in, old losers get paid off. This utility runs next to your other Expert Advisors and never opens a trade. It keeps a savings book of the net realized profit of your whole account and uses it to close the oldest losing positions of the EAs you choose - slice by slice, oldest first. WHY IT EXISTS Made by traders, for traders. One of our grid EAs got stuck in drawdown for months. The old positions did not come back, and they paid swap every single
Recovery EA for MetaTrader 5 - Partial Recovery, Grid and Zone. RecoveryPilot works a losing position back instead of hoping for a reversal. Its main mode, Partial Recovery , locks the losing trade, splits it into small parts and pays the loss off part by part with small trend-following recovery orders. The auto profile sets step, lot and order count for each symbol. Grid averaging and zone recovery are included as alternative methods. Before a cycle starts, the EA calculates what it can lose; i
You run several EAs on one account, plus a few trades by hand. The balance shows the total. It doesn't show which EA earns the money and which one gives it back. Magic Stats reads the deal history of your MT5 account and shows one row per magic number : how each EA has actually performed, in any period you choose. It is an indicator, so it sits on a chart next to any EA. It never opens, changes or closes a trade. What you see for every EA (magic number) Name and symbols traded Trades , win % , n
FREE
High-impact news such as Non-Farm Payrolls, CPI or a central-bank rate decision can move a market in seconds: spreads widen, prices gap, pending orders fill far from where you placed them. News Filter reads the economic calendar that is built into MetaTrader 5 and tells you when a news window is coming. If you switch it on, it also clears pending orders, closes positions and publishes a pause flag that your own EAs can read. Free, fully working, no time limit. No nag screens, no upgrade prompts
FREE
A daily loss limit only helps if it is enforced, also on the day you would rather ignore it. Daily Loss Limit enforces it: you set one line for the day, and when equity reaches it, Daily Loss Limit closes everything and keeps the account flat until the next daily reset. Free, fully working, no time limit. No nag screens, no upgrade prompts inside the program. It never opens a trade on your account. What it does Daily loss limit in money or in % of the day reference (default: 5 %). The day refere
FREE
Complete guide (every setting): https://www.mql5.com/en/blogs/post/778504 Launch price: 39 USD for the first 10 copies. Then 59 USD, final price 79 USD. Early buyers keep every future update. Trade Panel Sextant for MetaTrader 5 – every trade sized from your risk. You set how much you want to risk, place the stop where the chart says, and Sextant calculates the lot size, sends the order and manages the trade. An account guard with a daily loss limit, a daily target and trade caps keeps a bad day
FREE
A daily loss limit only helps if it is acted on, also on the day you would rather ignore it. Daily Loss Limit acts on it for you: you set one line for the day, and when equity reaches it, Daily Loss Limit closes everything and closes or deletes every new order until the next daily reset (see Honest limits ). Free, fully working, no time limit. No nag screens, no upgrade prompts inside the program. It never opens a trade on your account. What it does Daily loss limit in money or in % of the day r
FREE
Complete guide (every setting, set files): https://www.mql5.com/en/blogs/post/778433 Live account (my own, same strategy, since Feb 2026)*: mql5.com/en/signals/2372831 LongRunner buys a stock index once a day and sells it again before the broker's daily rollover. Stock indices have risen over the long run, but holding them as a CFD costs financing (swap) at every rollover. LongRunner takes the daily move and leaves that cost out: a new long position at a fixed server time, closed at a fixed time
Complete guide (every setting, set files): https://www.mql5.com/en/blogs/post/778434 Second Wind trades the Turnaround Tuesday strategy, one of the oldest and best documented calendar effects in stock indices. Weekend news often pushes indices lower on Monday. When that happens while the index is already in a pullback, Tuesday has tended to recover. Second Wind buys on Monday while price is below its moving average and sells at a fixed time on Tuesday. At most one trade per week and symbol. Long
Relay EA
Pitt Petruschke
Complete guide (every setting): https://www.mql5.com/en/blogs/post/778503 Relay runs three strategies as one Expert Advisor: Dawnbreak (morning range breakout), LongRunner (daily index long without swap) and Second Wind (Turnaround Tuesday). You attach Relay to a single chart. It opens one chart per slot with that strategy's own dashboard and shows the whole portfolio on one overview panel. One strategy on one symbol is a slot . Relay has 13 slots built in. Each slot has its own magic number and
Snapback Pro EA
Pitt Petruschke
Complete guide (every setting, set files): mql5.com/en/blogs/post/778006 Recommended brokers: mql5.com/en/blogs/post/778007 Live signal (real money since Oct 2026): mql5.com/en/signals/2397731 Snapback waits for a day on which price stretches far beyond the previous day's range – by default more than four times half of that range. Moves like that rarely last. Snapback lets the first real pullback show, then enters against the stretch and works the trade as a linear grid until the whole basket
Fairway
Pitt Petruschke
Complete guide (every setting, set file): https://www.mql5.com/en/blogs/post/778374 Fairway trades AUDCAD on M5 back to its mean. AUDCAD spends most of its time moving sideways, and stretched moves tend to swing back. Fairway opens a basket when the price is stretched beyond an Envelopes band on H1, adds orders at a growing distance while the price keeps running, and closes them in profitable pairs on the way back. Grid EAs usually have one weak spot: a long trend against an open basket. Fairway
Filter:
No reviews
Reply to review