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
| Setting | Default | What it does |
|---|---|---|
| Symbol | Symbol to study, blank = this chart's symbol | |
| Max days | 500 | Most recent calendar days to include |
| Asian start hour | 0 | Asian killzone start, server-time hour (0-23) |
| Asian end hour | 3 | Asian killzone end, server-time hour (0-23, exclusive) |
| London open start hour | 7 | London open killzone start, server-time hour (0-23) |
| London open end hour | 10 | London open killzone end, server-time hour (0-23, exclusive) |
| New york open start hour | 12 | New York open killzone start, server-time hour (0-23) |
| New york open end hour | 15 | New York open killzone end, server-time hour (0-23, exclusive) |
| London close start hour | 15 | London close killzone start, server-time hour (0-23) |
| London close end hour | 17 | London close killzone end, server-time hour (0-23, exclusive) |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Trading Sessions · Alerts · MT4 Script · MQL4 Source Code