Trading Cost Ledger
- Utilities
- Version: 1.0
- Activations: 10
Trading Cost Ledger reads your own account's closed trade history and adds up exactly two things: commission and swap. It does not predict, and it does not advise. Every number on the panel is something that already happened on this account.
How the numbers are built: it reads up to 365 days of closed deals across every symbol and every magic number - this is an account-wide picture, not a chart-specific one. Total commission (365d) sums the commission recorded on each deal; Total swap (365d) sums the swap recorded on each deal, keeping its sign - a positive total means the account received more swap than it paid. Trading cost (365d) adds the commission total to whatever part of the swap total was a payment (a positive swap balance does not turn the cost negative; it is simply not added). On the same row, a percentage figure divides that trading cost by the sum of every closed deal with a positive result in the same window, so you can see the cost as a share of what the account actually made - it does not show those underlying deal amounts themselves, only this one ratio. With fewer than 5 qualifying deals in the 365-day window, there is not enough history to report a number, and the panel prints "Collecting history" instead.
Highest-cost symbol names the one symbol where commission and swap payments added up to the largest amount over the same 365 days, next to that amount. A CSV report is written to the terminal's file folder, broken down by month and by symbol, with commission, swap, trading cost and deal count in separate columns - useful for anyone who wants to look at the numbers beyond what fits on the chart. The exact file path is printed on the panel itself, so there is nothing to look up separately.
Screenshot 1, USDJPY M15, a real account: Total commission (365d) reads 0.00 JPY, Total swap (365d) reads 0.00 JPY, Trading cost (365d) reads 0.00 JPY, the percentage figure next to it reads 0.0%, and Highest-cost symbol shows USDJPY at 0.00 JPY. State reads OK. This account's broker charges no commission and no swap on the symbols traded, so every field reports that honestly - not a placeholder, not a demo value with the real numbers hidden.
Screenshot 2, EURUSD H1, the same account: the panel is moved to the bottom-right corner and CSV writing is switched off, which is what two of the five inputs actually control - the CSV report line disappears entirely when that input is off. Every number still matches screenshot 1 exactly, because the tool reads the whole account's history, not the symbol on the chart in front of it.
What it does not do: it never places, closes or modifies an order - there is no connection to the trade side of the terminal at all. It uses no technical indicator and no other timeframe; the only material is each closed deal's own commission, swap, symbol and time. It never suggests avoiding a symbol or switching brokers - the panel states amounts, and nothing else. It does not estimate spread cost, because a closed deal's history does not record the market price at the moment it was placed - only commission and swap are measured. It does not compare brokers, and it does not forecast future cost. It does not merge history across multiple accounts or terminals - only the one the chart is running on. Deposits, withdrawals and other non-trade balance operations are excluded from every count.
Five inputs. Four are about how the panel looks: show or hide it, which corner it sits in, its font size, and its text color. The fifth turns the CSV report on or off - on by default, since the report is one of the two things this tool actually produces. There is no numeric threshold anywhere in the settings; the 365-day window and the 5-deal minimum sample are both fixed.
One condition worth knowing before testing it: the Strategy Tester's account history only contains deals made during that specific test run, so a fresh test will normally show "Collecting history" throughout. This is a property of how the Tester works, not a fault in the tool - loaded on a live account or a demo account with real trading history, the panel and the CSV report fill in with that account's own measured numbers from the first tick.
This is one of a small set of account-history tools from the same author. Three free, no-advice indicators - Trade Behavior Mirror, Win Streak Size Creep Mirror and Multi-Symbol Chase Mirror - read the same kind of closed history to show entries placed shortly after a loss, lot growth during a run of wins, and how many different symbols were traded. This is the first paid tool in that same lineage, built for anyone who wants the cost side of the picture rather than the behavior side. The author's MQL5 profile lists these alongside several paid MT5 indicators and utilities for gold-specific signals, trade risk limits and backtest-versus-live auditing.
