Measuring Live Trading Costs, Swap, and Commission on a Broker Account
Summary
This read-only Expert Advisor measures several components of trading cost for a broker account and symbol: live spread from distinct tick quotes, swap for long and short positions, and commission inferred from the account’s closed deals. It compares the live spread with the median spread recorded in recent one-minute bars, arguing that bar spread fields can understate the quote-level cost. An example reports a substantial difference on gold, while also illustrating the risk of relying on a bar-based threshold in a filter or backtest.
The report emphasizes that swaps can differ by position direction and include a weekday with a triple charge; it also notes that many custom simulators omit them. Its measurement safeguards include rejecting stale weekend quotes, checking for enough distinct quotes, and respecting the broker’s swap mode when converting values. Some swap modes cannot be converted without assumptions about price or calendar conventions. The tool does not measure slippage or judge strategy viability, and its examples are account- and symbol-specific rather than general cost estimates.
Key ideas
- Live spread sampling can differ materially from the spread recorded on one-minute bars.\nSwap costs may be asymmetric by direction and include a triple-charge weekday.\nCommission is account-specific and is read from closed deals rather than assumed from symbol settings.\nDistinct-quote and stale-tick checks help prevent misleading spread measurements.\nThe tool omits slippage and does not assess whether a strategy is viable.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.