Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

Session Boxes with DST-correct clocks - indicator for MetaTrader 5

Bayram Erhan Partal
Bayram Erhan Partal
MQL5 / MQL4 developer: Expert Advisors, indicators, Pine Script to MT5.
I deliver code that matches your specification, and I show the proof.
With every job you get
- Source code (.mq5/.mq4) and the compiled file, inputs named as in your spec
Views:
7
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

Most session indicators shift every session by one fixed offset from the server time. The United States and Europe change their clocks on different weekends, so for a few weeks every spring and autumn those boxes sit one hour away from the real London or New York session.

This indicator starts from each city's local session hours, converts them to UTC through that city's own daylight saving calendar, and then to your broker's server time. The boxes stay on the right hours through every clock change, and the history drawn for past days uses the rules that were valid on those days.

Session Boxes

XAUUSD M20: Tokyo, London and New York boxes with their ranges, and the clock panel

Sessions

  • Tokyo 09:00-18:00 JST (Japan has no daylight saving time)
  • London 08:00-17:00 local time (UK daylight saving: last Sunday of March to last Sunday of October)
  • New York 08:00-17:00 local time (US daylight saving: second Sunday of March to first Sunday of November)

How to read it

Each box spans the session from its open to its close and from its high to its low. The label shows the session hours in local time and the range (high minus low) in price units. A session that is still running grows with every new bar. The London label sits below its box and the other labels above, so overlapping sessions stay readable.

The clock panel shows the live time on the server, in UTC, London, New York and Tokyo, each with its current offset or zone name (GMT/BST, EST/EDT). It updates every second, also when no new quotes arrive, and takes its colors from the chart's color scheme.

Input parameters

  • Broker server clock: "New York + 7h" means the server runs at GMT+2 in winter and GMT+3 in summer, switching with US daylight saving time. Most MT5 brokers use this clock. "Fixed" applies today's server offset to all history; use it when your broker's server keeps another rule.
  • Days to draw: how many days of sessions are drawn, counted back from today.
  • Tokyo / London / New York: show or hide each session.
  • Tokyo / London / New York box color: color of each session's box and label.
  • Clock panel: show or hide the clock panel.

Notes

In "Fixed" mode today's boxes are always right, but boxes on past days can be one hour off around the clock changes if your broker's offset changed then. The indicator draws objects only and has no buffers. Intraday timeframes (M5 to H1) show the session edges best. Tested on XAUUSD M15 and M20.

Prop Firm News Window Countdown and Spread Monitor Prop Firm News Window Countdown and Spread Monitor

Tracks live MQL5 economic calendar events and real-time Bid-Ask spread in a chart HUD, exposing three iCustom buffers for EA news and spread gating.

False Breakout Envelope False Breakout Envelope

False breaks at an ATR envelope, drawn as trades: price pushes through a band, closes back inside, and a box runs from the entry to the moving midline, with the stop as a thick line. Each label prints the win rate of earlier signals in the same RSI zone, and a corner card charts it for every zone.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.