Reconstructing Partial Trades on Netting Accounts for Chart Display
Summary
This article explains how a MetaTrader indicator can rebuild and display the history of a position on a netting account, including entries, partial exits, and reversals. Since opposite-side deals reduce, close, or reverse a single symbol position, the indicator processes trade history rather than treating every deal as a separate open position.
Its method tracks deal price, volume, and ticket in an array, classifies deals by entry or exit type, and updates that record as trades occur. Exit volume is allocated against recorded entries, while reversal deals create the residual position on the opposite side. The resulting data drives chart lines and volume labels; trade events and new bars prompt updates.
The examples illustrate how these rules explain changing displayed lots and average prices. The indicator is intended for netting accounts and relies on platform history and event behavior. The article describes implementation and visualization, not a tested trading strategy or evidence of predictive performance.
Key ideas
- Netting accounts combine same-symbol trades into one position, so deal history is needed to reconstruct its components.
- The indicator records deal prices, volumes, and tickets, then processes entry, exit, and reversal events.
- Partial exits reduce recorded trade volume, while reversals close the prior direction and establish residual exposure in the opposite direction.
- Chart lines and labels are refreshed from the reconstructed position state as trades or bars update.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.