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 Clock - indicator for MetaTrader 5

Gabriele Volpato
Gabriele Volpato
5 (1)
Eudora Lab is the home of the Eudora Expert Advisors.
One Expert Advisor per instrument, validated on real ticks, with the exact backtest recipe published so you can reproduce the numbers before you buy.
Every message gets a personal answer.
Views:
56
Published:
SessionClock.mq5 (55.53 KB) view
session_clock.png (49.99 KB)
session_clock.gif (319.45 KB)
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

Which sessions are open right now, how long until the next one opens, and how much time is left on the current candle: Session Clock answers at a glance, on a 24-hour dial that turns with the day.


Session Clock on EURUSD M15: opening, live countdown, collapse and expand

The panel is drawn on a canvas with antialiased shapes and smooth transitions. The arcs of the sessions draw themselves in when the panel opens, the hand moves with the GMT clock and the open sessions light up. A button in the header folds the panel into a slim bar with the open sessions and the candle countdown, and the panel can be dragged anywhere on the chart by its header. The code is a single file and uses only the standard Canvas library.

What the panel shows

  • Dial: 24 hours in GMT, midnight at the top, clockwise. One arc per session: Sydney, Tokyo, London and New York. An open session is bright with a soft glow, a closed one is dim. The hand marks the current time.
  • Candle countdown: in the center, the time left before the current candle of the chart timeframe closes, with a ring that fills as the candle progresses. When the market is closed it shows the time to the next trading session of the symbol.
  • Legend: one line per session with its hours and "open, closes in 2h 14m" or "opens in 5h 02m".
  • Spread: the current spread in points against the average collected since the indicator was loaded.
  • Day range: the high-low of today as a percentage of the average daily range of the last 14 trading days.
  • GMT / Server: both clocks.

Daylight saving time

The session hours follow daylight saving time by themselves. London moves with the European rule, New York with the United States rule and Sydney with the Australian rule, each on its own dates, so the weeks of March, October and November in which the three are out of step are shown correctly. Tokyo never moves. The rules were checked hour by hour from 2024 to 2030 against the official time zone data.

Inputs

  • Distance from the left edge / top edge: starting position of the panel, in pixels. After that the panel remembers where it was dragged, chart by chart.
  • Panel size, percent: scales the whole panel; it also follows the DPI of the screen.
  • Accent color: the color of the light on the panel.
  • Start collapsed: opens the panel as a bar the first time.
  • Sydney / Tokyo / London / New York opens at, hour GMT: the opening hours in northern winter (21, 0, 8, 13). Each session lasts nine hours.
  • Adjust the sessions for daylight saving time automatically: on by default. Turn it off to use the hours exactly as entered.

Works on any symbol and timeframe. One copy per chart.

Trade Pad Trade Pad

An animated one-click trading panel for the chart symbol: buy and sell with live prices, lot stepper, close all, close profit, close loss and breakeven, with confirmations, a practice mode and a collapsible, draggable panel.

Equity Drawdown Monitor Equity Drawdown Monitor

An animated chart panel that shows the equity drawdown of the account in real time, the closed result of the day, week and month, and one line for every Expert Advisor running on the account.

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.