Trade History Statistics Panel
- Indicateurs
-
Kazuma Kamizono
MQL5 / MQL4 / Pine Script v6 developer and active trader.
Seller on the MQL5 Market (indicators for MT4/MT5).
Services:
- TradingView Pine Script to MT5/MT4 conversion (bar-by-bar matching, with tester report)
- MT4 to MT5 migration - Version: 1.0
- Activations: 5
Trade History Stats Panel for MetaTrader 4 reads the closed trades in your own account history and sums them up in a panel on the chart: number of trades, win rate, profit factor, average P/L per trade, drawdown of the closed-trade curve, holding time, buy / sell, and tables by month, symbol, weekday and hour. It is a record-keeping tool for looking back at your past trades, like a trading journal that fills itself in. It never places, modifies or closes orders, and it gives no buy / sell signals.
FIRST: SET THE ACCOUNT HISTORY TAB TO ALL HISTORY
MT4 only gives indicators the trades of the period selected in the terminal's Account History tab. To count everything, open the Account History tab, right-click and choose All History. The panel shows this reminder at the bottom.
WHAT IT SHOWS
- Period buttons: Today / This week (from Monday) / This month / Last month / This year / All / Custom dates, judged by the closing time (server time), within the trades loaded in the Account History tab.
- Filters on the panel: all symbols or the chart symbol only (or your own symbol list), all trades / manual trades only (magic 0) / your own magic number list. Commission and swap can be included or excluded with one click.
- Summary: trades, wins / losses (and break-even trades), win rate, net profit, gross profit, gross loss, profit factor, average P/L per trade, average win, average loss, largest win, largest loss, max consecutive wins / losses, max drawdown of the closed-trade curve (amount and %), average holding time, commission, swap, and buy / sell rows.
- Tables: by month (closing time), by symbol, by weekday (opening time) and by hour (opening time, server time), each with trades, win %, net, PF and average. Long tables are split into pages.
- Closed-trade profit curve (cumulative P/L of the selected trades).
- CSV export of the summary and the trade list (saved in MQL4\Files).
- English or Japanese, chosen automatically from the terminal language (can also be set by hand). Light or dark colors, chosen automatically from the chart background. Any corner, three sizes, collapsible to one line.
- The state of the buttons is kept when you change the timeframe of the chart.
HOW TRADES ARE COUNTED (so that you can compare with your own records)
- One trade = one position. When you close part of an order, MT4 creates a new ticket for the rest; the panel follows the "from #" / "to #" order comments and counts all linked tickets as ONE trade. Hedged (opposite) orders are separate trades.
- A Close By of two opposite orders is counted as ONE trade (profit, commission and swap of both sides added together), found by the "close hedge by #" comment.
- These links depend on MT4's standard order comments. If your broker rewrites the comments, or the original ticket is outside the Account History period, linked tickets can be counted as separate trades: the number of trades and the win rate change, but the net profit stays correct.
- Deposits, withdrawals and credit (bonus) are not trades. Credit is not part of the balance used for the drawdown %.
- Profit = order profit + commission + swap (commission and swap only when included). A trade is a win or a loss when it is more than half of the smallest currency unit away from zero, otherwise it is break-even. Win rate = wins / all trades.
- Max drawdown = the largest fall of the cumulative closed-trade P/L from its previous high, within the selected period and filters. Open orders and floating P/L are not included. The % divides that fall by the account balance at the time of the high, worked back from the current balance, so it can be calculated even when the Account History tab shows only a short period.
- MT4's own statement counts every closed ticket, so its trade count and win rate can differ from this panel when you have partial closes or Close By.
IMPORTANT
- Statistics of your past closed trades only. They do not show or promise future results, and they are not a trading signal or advice. Trade decisions are your own responsibility.
- Only trades in the Account History tab period are counted (see above). If the broker does not provide old history, those trades cannot be counted.
- All times are the broker's server time.
- The exported CSV contains your account number (in the file name and in the file). Remove it before sharing the file with anyone.
- The buttons' state is kept while the terminal is running. After a terminal restart or a change of the input settings, the panel starts from the input settings again.
OTHER
- MetaTrader 4 only (the MT5 version is a separate product). Works on any symbol and timeframe (by default it counts the whole account, whatever the chart symbol and timeframe).
- Several copies can be placed on one chart (for example one per magic number); panels in the same corner are stacked.
- No DLLs, no internet access. With the default settings it writes a file only when you press the CSV button.
- A PDF user guide (English or Japanese) with all definitions is available: send a message through MQL5 after purchase and it will be sent to you.
- Support through MQL5 messages, reply within 3 business days: installation, settings and bug reports only. Questions about market views, trade decisions or how to trade cannot be answered.
