Skip to content
All library documents

Displaying MT5 Server Time and Bid Price with a Timer-Based Indicator

Article MQL5 code base

Summary

This document describes an MT5 chart indicator that displays server time and the current bid price as labels in the main chart or a chosen subwindow. Its clock uses a timer event to update once per second, so the display can continue advancing when the platform is offline or prices are not ticking. The user can adjust the vertical label position and apply a seconds offset to align the displayed time with the broker’s server time. A separate subwindow helper indicator is required when labels are placed below the main chart.

The stated use case is keeping time and price visible when MT5 panels are hidden to make room for multiple charts, and it may help when broker time updates infrequently. The document gives setup guidance and an example of correcting a small seconds mismatch, but offers no benchmark or quantitative evaluation. It cautions that multiple timer-driven EAs and indicators may affect platform performance, particularly when they share timer identifiers.

Key ideas

  • The indicator places server-time and bid-price labels in the main chart or a selected subwindow.
  • A timer event advances the clock display every second, even when ticks are unavailable.
  • A configurable seconds offset can align the display with the broker’s server time.
  • Timer-based indicators running alongside many other tools may affect platform performance.

Tags

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