Loading…

Day Separators With Labels

On any timeframe below Daily, working out which bars belong to which calendar day means counting backwards from the current bar - tedious on M15 or M5, and easy to get wrong across a weekend gap. This draws one vertical line at the first bar of each new server-time day and, when enabled, a small date label above it. The line lands on the first real bar of the day rather than at literal midnight, so it is always anchored to a bar that exists even when a broker's day boundary does not line up with a clean session start, and it survives weekend gaps without drawing a spurious line inside the gap itself. Notes and limitations - On the Daily timeframe or higher, every bar is already its own day, so this indicator adds a line at effectively every bar - it is meant for intraday charts. - Day boundaries follow the terminal's server time, not the trader's local timezone. - Lines are placed only at bars that exist; no line is ever drawn inside a period with no price data (e.g. a weekend gap). - Purely cosmetic: it does not evaluate or signal anything about the price itself, so there is nothing here that can repaint.

Indicator · MT5 · v1.0 · Free

About Day Separators With Labels

Day Separators With Labels is an indicator for MetaTrader 5. It has 5 settings, such as Days back, Line color and Line style. MQL source code included.

Files in the download: DaySeparators.ex5, DaySeparators.mq5, DaySeparators.txt.

Settings

SettingDefaultWhat it does
Days back30Calendar days of history to mark
Line colorclrSilverSeparator line colour
Line styleSTYLE_DOTSeparator line style
Show labelstrueShow date labels
Label colorclrGrayDate label colour

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria