Account PnL Board
- Indicatori
- Versione: 2.30
Account PnL Board is a MetaTrader 5 indicator that turns your deal history into a readable performance report drawn directly on the chart.
Instead of a single balance figure you get one row per day, week, month or year with realised P&L, P&L percentage, lots traded, deal count and period-end balance, plus floating risk split into winners and losers, a deposit and withdrawal ledger and a full closed-trade log.
It is a single indicator file. No dynamic libraries, no external services, no sub-window and no indicator buffers, so it does not affect the chart data window or the template.
Period table
- Day, week, month and year aggregation, weeks start on Monday
- Realised P&L = DEAL_PROFIT + DEAL_SWAP + DEAL_COMMISSION, BUY and SELL deals only
- P&L percentage measured against the balance at the start of each period
- Lots closed, closing-deal count and period-end balance
- A total row across all periods, with the current period pinned on top
Open risk
- Floating P&L separated into positive and negative parts, as values and as a percentage of balance
- Optional treatment of the entry commission already paid on open positions
Chart
- Balance curve drawn as a line or as per-period bars
- Style selected automatically, line for the day view and bars for the other periods, or forced per tab
- Five grid levels with right-aligned labels
Ledgers
- Cash: every deposit and withdrawal together with the balance after each operation
- Trades: time, symbol, side, lots, open price, close price and P&L
Interface
- Four languages, English, Chinese, Japanese and Korean, switchable live from the title bar
- Per-language font selection so CJK text never renders as missing glyphs
- Draggable panel, collapsible to a 24 px title strip, dockable to any chart corner
- Interface scale from 0.5 to 3.0 with automatic shrink-to-fit on small charts
- 18 configurable colours and panel opacity from 0 to 255
- Scrollable detail rows, drag the thumb or click the track to page
Input parameters
InpTitle, title text, empty means the localised title plus version.
InpLanguage, startup language, Chinese, English, Japanese or Korean.
InpUIScale, overall interface scale, 0.5 to 3.0.
InpFont, font name, falls back to Arial when unavailable.
InpAutoFont, automatically use a font with Hangul glyphs in Korean mode.
InpBold, bold text.
InpCorner, panel docking corner.
InpX and InpY, pixel margins from the docking corner.
InpRefreshSec, refresh interval in seconds.
InpAllowDrag, allow moving the panel by its title bar.
InpAlpha, panel opacity, 0 to 255.
InpClr inputs, 18 colour settings covering the panel, borders, tabs, headers, totals, profit, loss, axis, curve, separators, row highlight, up and down bars and the scrollbar.
InpCountEntryComm, include the entry commission already paid on open positions in the floating P&L.
InpMaxRows, maximum number of detail rows, 0 means unlimited.
Calculation notes
Realised P&L per period is the sum of DEAL_PROFIT, DEAL_SWAP and DEAL_COMMISSION over BUY and SELL deals closed inside the period. DEAL_TYPE_BALANCE deals are excluded and reported separately as cash.
P&L percentage per period is the period P&L divided by the balance immediately before the period first deal. Using the opening balance keeps periods comparable after deposits or withdrawals.
The balance column shows the account balance after the last deal of the period.
Floating profit and floating loss are the positive and negative parts of POSITION_PROFIT plus POSITION_SWAP over open positions. With InpCountEntryComm enabled the commission already paid on those positions is subtracted, because POSITION_COMMISSION is deprecated in MQL5 and returns 0.
The total row shows the period count, the summed P&L, the P&L as a percentage of the total deposited, the summed lots and deals, and the current balance and floating figures.
Requirements
MetaTrader 5 terminal and MetaEditor. Any symbol. The panel reads the account own deal history, so it reflects whatever history depth the broker provides. No dynamic libraries, no network access and no external services.
Installation
1. Place AccountPnLBoard.mq5 in the MQL5\Indicators folder of the terminal data directory.
2. Compile it in MetaEditor.
3. In the Navigator open Indicators and drag AccountPnLBoard onto a chart.
Limitations
Mouse wheel scrolling is not available, because MQL5 mouse events do not carry wheel deltas. Use the scrollbar thumb or click the track to page.
The report reflects the account visible deal history, so it is bounded by the history depth provided by the broker.
Very long histories increase the first build time, later rebuilds are throttled and cached.
Disclaimer
Educational tool for reviewing your own trading history. It does not provide signals and makes no performance claims. Trading leveraged products carries a high risk of loss.
