Magic Number Stats
- Indicators
-
Takeshi Goto
MQL5 / MQL4 developer. I build Expert Advisors, indicators and utilities for MetaTrader 5 and 4.
What I do:
- New EAs and indicators from your rules (MT5 / MT4)
- Fixing bugs and adding features to existing EAs (with source code) - Version: 1.0
Magic Number Stats shows how each Expert Advisor on your account is really doing.
If you run several EAs on one account, the account history mixes all of their trades together. This indicator separates them by magic number and shows one row per EA, so you can see at a glance which EA is earning and which one is losing.
For every magic number (manual trades are shown as "Manual") the table shows:
- Trades: number of closed positions
- Win%: share of positions that closed with a profit after commission, swap and fees
- Net: net profit in the account currency
- PF: profit factor (gross profit / gross loss)
- AvgWin and AvgLoss: average profit of winning and losing positions
- MaxDD: maximum drawdown of the closed-trade equity curve of that EA
- AvgHold: average holding time
A TOTAL row summarizes the whole account. Rows with a profit are shown in green and rows with a loss in red. The order comment of the first trade is shown next to the magic number, so EAs are easy to recognize.
How it works
- Results are calculated per position: all deals of a position (entry, partial and final exits) are added together, including commission, swap and fees.
- Only fully closed positions are counted. Open positions are not included.
- The table refreshes automatically.
The indicator is read-only. It never opens, modifies or closes any order, and it does not send any data outside the terminal.
Inputs
- Period in days (0 = whole history)
- Symbols: all symbols or the chart symbol only
- Include commission, swap and fees: yes or no
- Sort rows by: net profit, number of trades or magic number
- Maximum number of rows
- Refresh interval (seconds)
- Panel corner, horizontal and vertical offset, font size and colors
Note: the statistics describe past trades only and do not predict future results.
