Loading…

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 · MT4 · v1.0 · Free

About Session Open Continuation Study

Session Open Continuation Study is a script for MetaTrader 4. 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.mq4, SessionOpenContinuation.txt.

Settings

SettingDefaultWhat it does
SymbolSymbol to study, blank = this chart's symbol
Max bars6000Most recent H1 bars to include (bounds runtime on long history)
Asian start hour0Asian session start, server-time hour (0-23)
Asian end hour8Asian session end, server-time hour (0-23, exclusive)
London start hour8London open, server-time hour (0-23) - must have an H1 bar exactly at this hour
London session hours4Hours after London open measured for continuation (1-16)

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: Breakout · Trading Sessions · Alerts · MT4 Script · MQL4 Source Code

MQL4 & MQL5 scripts · PolyMaria