Skip to content
All library documents

Building a Real-Volume Delta Indicator from Exchange Tick Data

Article MQL5 articles

Summary

The article explains how to construct a buy-versus-sell volume delta histogram in MetaTrader 5 from exchange trade ticks. It distinguishes real volume from tick volume, describes checking that a broker server identifies trade direction, and uses tick history fields to assign trade sizes and buy or sell flags to bars. Historical bars and the active bar are calculated separately, then the indicator requests incremental tick updates for real-time display.

It also discusses implementation details that affect accuracy and testing, including millisecond timestamps, tick retrieval ranges, server and terminal versions, and the possibility that several ticks arrive together. The example uses Moscow Exchange derivatives data, where exchange-traded real volume is available; the author explicitly notes that this kind of real-volume analysis does not apply to OTC Forex. The article provides a development workflow and a visual example, but no controlled evidence that delta improves forecasts or trading results.

Key ideas

  • The indicator calculates each bar’s delta as buy volume minus sell volume from trade ticks.
  • Tick flags and millisecond timestamps help classify trades and assign them to the correct bar.
  • Historical bars and the current bar use separate calculation paths, followed by incremental real-time updates.
  • Correct direction data depends on a suitable exchange server and accurate tick history.
  • The method relies on centralized-market real volume and does not transfer directly to OTC Forex.

Tags

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