Skip to content
All library documents

Monitoring Variable Broker Spreads with Offline OHLC Charts

Article MQL5 code base

Summary

The document describes a MetaTrader method for tracking a broker’s changing bid–ask spread over time. An indicator records the spread in OHLC format in a history file, which can then be viewed as an offline chart. Applying a moving average to that chart can help observe how the spread changes and estimate its typical level.

The chart interval is determined by the source chart: a one-minute chart produces minute data, while an hourly chart produces hourly data. The document says a complete source bar must finish before the offline chart has data, so longer intervals delay the first reading. Version 2.0 uses a symbol suffix while keeping the original time frame; version 1.0 instead uses a nonstandard time frame. The indicator requires DLL imports to be enabled. No performance results or validation are provided, and the description does not discuss how spread observations should be used in a trading decision.

Key ideas

  • The indicator records the ask–bid difference as OHLC data for an offline chart.
  • The source chart’s interval sets the time resolution of the spread series.
  • A full source bar must complete before spread data appears.
  • Version 2.0 distinguishes the offline chart with a symbol suffix, while version 1.0 uses a nonstandard time frame.
  • A moving average can be applied to the chart to observe average spread behavior.

Tags

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