Skip to content
All library documents

Reading OANDA Order and Position Histograms in a Trading Chart

Article MQL5 code base

Summary

This indicator displays historical OANDA order-book or position-book distributions on a price chart. A selected time, marked by a vertical line, determines which histogram is shown. An accompanying download manager must run to keep data updated, although previously downloaded history can be viewed without it. The display can track the latest time as new bars arrive and offers basic, cumulative, difference, and cumulative-difference views. Order data groups limit and stop orders, including take-profit and stop-loss levels; position data groups active positions by opening price.

The description says coverage is limited to a specified set of currency pairs and precious metals. Historical observations are spaced at least twenty minutes apart, with intervals that can widen to a day depending on history depth, and gaps may occur. Data uses UTC, so the broker server offset must be configured correctly for chart times. This is a visualization of broker-provided orders and positions, not a complete market-wide order book or a trading strategy, and its sampling and coverage constrain interpretation.

Key ideas

  • The indicator overlays historical order or position price distributions on a chart.
  • A separate download manager is needed for continuous data updates.
  • Four formats show raw, cumulative, directional difference, or cumulative difference values.
  • The data covers a limited instrument set and may have irregular time gaps.
  • UTC timestamps require a correct broker-server time offset for accurate display.

Tags

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