Skip to content
All library documents

Updating Replay Bar Timers During Low Liquidity

Article MQL5 articles

Summary

This article examines why a chart mouse indicator that estimates time remaining in a bar can become stale when few quotes arrive. Because MetaTrader 5 calls the indicator’s calculation handler when it receives quote updates, a spread-based timer may stop advancing during quiet periods. Auctions pose a related but distinct case, since quote events may cease entirely while the market is suspended.

The author tests whether a replay service can keep the indicator informed by repeatedly updating a custom symbol’s spread and advancing its bar timestamp in one-minute steps. The test service opens a chart, attaches the indicator, and sends a custom chart event when the simulated minute changes. The article reports that the approach triggers the needed calculation behavior and outlines how the indicator retrieves spread data for non-minute chart periods. The auction case is deferred: the indicator can display auction status, but the service-side signaling method is left for a later article. This is an implementation demonstration, not a trading strategy or a broad performance evaluation.

Key ideas

  • A spread-based bar countdown advances only when the platform receives quote updates.
  • A replay service can simulate quote activity by repeatedly updating a custom symbol’s spread.
  • The test advances the custom bar timestamp by one minute to trigger a new bar event.
  • The method addresses sparse quote periods, while auction handling is deferred.

Tags

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