Skip to content
All library documents

Estimating Upward and Downward Volume from OHLC Bars

Article MQL5 code base

Summary

This indicator divides a bar’s reported volume into upward and downward components using the bar’s open, high, low, and close. It defines the upward coefficient as the distance from the open to the high, and the downward coefficient as the distance from the close to the low. Each component receives a share of total volume proportional to its coefficient relative to the sum of both coefficients.

The method is a heuristic derived entirely from OHLCV bar data, so it does not observe the actual sequence of trades or buyer and seller identities. The document specifies no adjustable settings and provides no empirical validation, trading rules, or performance results. It is therefore best understood as a way to apportion bar volume for visualization or analysis, rather than a direct measurement of executed buying and selling pressure.

Key ideas

  • The indicator allocates a bar’s volume between upward and downward components using price ranges.
  • The upward component is weighted by the high-minus-open distance.
  • The downward component is weighted by the close-minus-low distance.
  • The calculation uses only OHLCV bar values and has no configurable parameters.
  • The resulting split is an estimate and does not reveal the actual direction of trades.

Tags

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