Loading…

Broker DST Transition Table

A session-based strategy that opens or closes trades at a fixed server hour quietly drifts by an hour twice a year on any broker that observes daylight saving - and the dates it drifts on rarely match the trader's own country's DST calendar, or even a textbook European or American rule, because the broker's own liquidity provider or server location sets the actual schedule. Rather than assume a DST rule, this script finds the evidence directly in the price history. A normal H1 bar series steps forward by exactly one hour between consecutive bars. A spring-forward clock change compresses that gap to about two hours as the server clock skips an hour; an autumn-back change produces a gap noticeably under one hour as the clock repeats an hour. Walking the loaded history and flagging every bar-to-bar gap that is not the expected weekend closure (48+ hours) or a normal 1-hour step surfaces every DST transition this symbol's history contains, with its exact date and the direction of the shift. Notes and limitations - Detection relies entirely on bar-spacing anomalies in the loaded H1 history. A broker that does not observe daylight saving at all will correctly show zero transitions - that is a valid, useful result. - If the loaded history does not reach far enough back, older transitions simply will not be found; the report never fabricates a date it has no evidence for. - A symbol with irregular gaps in its own price history for reasons unrelated to DST (thin liquidity, a data outage) can occasionally produce a false positive close to 23 or 25 hours - cross-check an unexpected entry against a well-established major on the same broker. - This reports what has already happened, not a prediction. A broker can change its DST policy going forward, and this table needs a re-run after enough new history accumulates to reflect that.

Script · MT4 · v1.0 · Free

About Broker DST Transition Table

Broker DST Transition Table is a script for MetaTrader 4. It has 2 settings, such as Symbol and Max transitions. MQL source code included.

Files in the download: BrokerDstTransitionTable.mq4, BrokerDstTransitionTable.txt.

Settings

SettingDefaultWhat it does
SymbolSymbol to analyse, empty = current chart symbol
Max transitions20Maximum number of transitions to report (most recent first)

How to install

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

Download the PDF guide

Tags: Trading Sessions · MT4 Script · MQL4 Source Code

MQL4 & MQL5 scripts · PolyMaria