Skip to content
All library documents

Visualizing Balance, Equity, and Floating P/L in MetaTrader 5

Article MQL5 articles

Summary

The article describes a MetaTrader 5 indicator for plotting account balance, equity, floating profit or loss, and a starting-balance reference over historical chart bars. It reconstructs account history from deals, tracks position details, and estimates historical floating results across symbols. The indicator samples data by bar and uses cached prices and instrument values to reduce repeated calculations; an update interval controls how often it checks for newly closed trades.

The curves are intended to help traders inspect how realized and unrealized results relate over time. The article interprets their divergence as a view of open-position performance and suggests that persistent floating losses or repeated averaging down may reveal risky behavior. It proposes checking the plot against the platform’s account history as a basic verification. These readings are diagnostic rather than proof of a strategy’s quality, and the article provides no performance study; historical reconstruction also depends on available deal and price data.

Key ideas

  • The indicator plots starting balance, balance progression, equity, and floating profit or loss in a separate chart window.
  • It rebuilds account history from deal records and tracks positions to estimate historical unrealized results.
  • Caching price and instrument data reduces repeated work when processing multiple symbols and bars.
  • The gap between equity and balance represents the effect of open positions at a given time.
  • Comparing curve patterns with account history can support behavioral and risk review, but does not establish strategy performance.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.