Discussing the article: "Aggregating Order Flow Delta from Tick Data in MQL5"

Check out the new article: Aggregating Order Flow Delta from Tick Data in MQL5.

Compute and visualize order flow delta in MQL5 from raw ticks, either per bar or cumulatively. The implementation applies the tick rule, threads state through bars, and annotates price–cumulative delta divergences closed on bars. Pure classes isolate logic for testing, and a synthetic tick script confirms behavior, improving robustness and clarity of the output.

Two bars can share the same open, high, low, and close and still tell opposite stories. In one, buyers lifted the offer again and again until the price drifted up. In the other, sellers hit the bid all the way down, and a few quote jumps carried the price up anyway. OHLC data cannot separate the two, because it records where price went and not how it got there.

Order flow delta is one of the simplest tools for reading that hidden story. It subtracts seller initiated volume from buyer initiated volume inside each bar. On trade data, a strongly positive value suggests aggressive buying, a strongly negative value suggests aggressive selling, and a value near zero suggests balance. On quote data, the same values describe quote pressure only. Computing it requires raw ticks because only ticks carry the direction of price changes inside a bar.

This article presents an indicator that computes delta from raw ticks. For each bar, it reads ticks via CopyTicksRange(), classifies them with the tick rule, and aggregates buy, sell, and unclassified volume (or tick counts in proxy mode). It plots per-bar or cumulative delta as a colored histogram and marks divergences with arrows.

Author: Ushana Kevin Iorkumbul