Loading…

Killzone Statistics Table

"Killzones" - narrow hour windows around the Asian range, the London open, the New York open and the London close - are widely discussed as places where price is more likely to sweep the prior day's high or low before reversing, but the claim is rarely tested against actual history. This script walks every calendar day in the requested history, builds each killzone's own open/high/low/close from the H1 bars that fall inside its configured hour window, and reports three figures per killzone: the average range in pips, the rate at which the killzone's own high or low pushed beyond the PRIOR calendar day's D1 high or low and then closed back inside it by the killzone's own close (the sweep rate), and the rate of two-sided ("reversal") windows where both the up-move and the down-move from the window's own open exceeded a configurable fraction of its range. Killzone hours are read from eight plain hour inputs rather than a fixed table, because every broker's server clock sits at a different offset from GMT and that offset itself changes with each side's own daylight-saving calendar. The hour windows handle wraparound past midnight for brokers whose clock places a killzone's hours on either side of the day boundary. The sweep definition is deliberately narrow: it requires both a break of the prior day's level AND a close back on the other side of it within the same killzone window. A killzone that simply pushes through a level and keeps going does not count as a sweep here - that is a breakout, a different and separately interesting pattern this script does not report. Notes and limitations - All eight hour inputs are server time as reported by iTime(); they are not auto-detected and must be set to match the broker this history came from. The default hours are a reasonable London-broker starting point, not a universal standard. - The sweep check needs the PRIOR calendar day's completed D1 bar; the very first day or two in a freshly-loaded history can lack it, in which case that day is still counted toward range and reversal statistics but is silently excluded from the sweep count - on long histories this has a negligible effect on the reported sweep rate. - The "sweep" definition requires a break AND a close-back within the same killzone window; it does not track what happens after the window closes, so a level broken cleanly and held is correctly not counted as a sweep here. - Killzone windows that overlap by configuration (e.g. London close bordering New York open) will let shared hours count toward both - this is intentional, since the point is each killzone's own footprint, not a mutually exclusive partition of the day.

Script · MT4 · v1.0 · Free

About Killzone Statistics Table

Killzone Statistics Table is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 10 settings, such as Symbol, Max days and Asian start hour. MQL source code included.

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

Settings

SettingDefaultWhat it does
SymbolSymbol to study, blank = this chart's symbol
Max days500Most recent calendar days to include
Asian start hour0Asian killzone start, server-time hour (0-23)
Asian end hour3Asian killzone end, server-time hour (0-23, exclusive)
London open start hour7London open killzone start, server-time hour (0-23)
London open end hour10London open killzone end, server-time hour (0-23, exclusive)
New york open start hour12New York open killzone start, server-time hour (0-23)
New york open end hour15New York open killzone end, server-time hour (0-23, exclusive)
London close start hour15London close killzone start, server-time hour (0-23)
London close end hour17London close killzone end, server-time hour (0-23, exclusive)

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 · Alerts · MT4 Script · MQL4 Source Code

MQL4 & MQL5 scripts · PolyMaria