Skip to content
All library documents

Using Vertical Price Histograms to Analyze Bid and Ask Distributions

Article MQL5 code base

Summary

This reference explains a chart tool that plots price values vertically and their frequencies horizontally, showing how bid and ask observations are distributed around the current bar. Histograms can extend left, right, or both ways, and can represent either absolute or relative frequency. The description outlines configuration options such as display scale, bar width, colors, and chart window.

It also describes methods for updating histogram columns, calculating distribution statistics, plotting the weighted mean, and displaying standard deviation around that mean. These features can help visualize where observations cluster and how widely they vary. The document is a class reference, not a trading strategy: it offers no market study, performance evidence, or guidance for interpreting the resulting distributions. It recommends use on smaller timeframes, but does not explain the rationale or specify limitations such as data quality or sampling effects.

Key ideas

  • The histogram places price levels on the vertical axis and their observed frequency on the horizontal axis.
  • Bid and ask distributions can be displayed relative to the current bar in different directions.
  • The tool supports absolute or relative frequency and can calculate distribution characteristics.
  • The weighted mean and standard deviation can be drawn on the chart to summarize the distribution.
  • The reference suggests smaller timeframes but provides no empirical evidence or trading rules.

Tags

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