Session Open Continuation Study
Trading the "London breaks the Asian range" pattern only makes sense if that breakout tends to continue more often than it reverses, and that rate plausibly depends on how wide the Asian range was to begin with - a narrow overnight range is a different setup from a wide one. This script walks the symbol's H1 bars day by day, computes each day's Asian-session high and low, checks whether the London open price sits above, below or inside that range, and - for the days where it broke out - checks whether the close at the end of a configurable London measurement window continued in the breakout's direction. The sample is then split into thirds by the size of that day's Asian range (narrow, normal, wide) so the continuation rate can be compared across range sizes rather than reported as one blended number. All four session-hour inputs are server time, since MT4 has no built-in timezone reference and every broker's server clock sits at its own offset from GMT. A day only enters the sample when both the London open bar and the bar closing the measurement window are present in the loaded H1 history - a bar missing to a data gap or an unusual holiday session drops that one day from the count rather than being estimated. Notes and limitations - All session-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. - Days where the London open price sits inside the Asian range (no breakout) are excluded from the sample entirely, since there is no breakout direction to test continuation against. - The range-size terciles are computed from the qualifying-day sample itself, so the "narrow/normal/wide" cut points shift with whatever history window is loaded, they are not fixed pip thresholds. - This is a historical base-rate study, not a live signal generator.
Script · MT5 · v1.0 · Free
About Session Open Continuation Study
Session Open Continuation Study is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 6 settings, such as Symbol, Max bars and Asian start hour. MQL source code included.
Files in the download: SessionOpenContinuation.ex5, SessionOpenContinuation.mq5, SessionOpenContinuation.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Symbol | Symbol to study, blank = this chart's symbol | |
| Max bars | 6000 | Most recent H1 bars to include (bounds runtime on long history) |
| Asian start hour | 0 | Asian session start, server-time hour (0-23) |
| Asian end hour | 8 | Asian session end, server-time hour (0-23, exclusive) |
| London start hour | 8 | London open, server-time hour (0-23) - must have an H1 bar exactly at this hour |
| London session hours | 4 | Hours after London open measured for continuation (1-16) |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Breakout · Trading Sessions · Alerts · MT5 Script · MQL5 Source Code