Extreme Formation Windows
Traders often have a hunch that a symbol's daily high or low tends to form around a particular clock time - a session open, an overlap, a data release window - but rarely check it against the instrument's own history. This indicator does the check directly: for every completed calendar day (broker time) it records which hour-of-day contained that day's high and which hour contained its low, building a running 24-hour frequency table. An hour is only shaded once its historical share of highs (or lows) meaningfully exceeds the 1/24 baseline a purely random hour would get - by default, at least InpHotMultiplier times that baseline. This keeps the shading tied to a real statistical signal in the table rather than colouring every hour by default. Shading itself is only drawn for the most recent InpDaysBack calendar days, so object count stays bounded on long histories, but the frequency table underneath is still built from the full available history. Each day's shading uses only the table as it stood BEFORE that day started - a day's own still-unknown outcome is never folded into its own shading. Notes and limitations - The hour-of-day split is only meaningful down to the chart's own bar granularity - on M1-M30 charts the high/low half-split within an hour is genuinely informative; on H1 and coarser, one bar covers the whole hour, so the split collapses to a single per-hour colour. - "Hot" is relative to a uniform 1/24 baseline, not an absolute claim that the high or low WILL form there - it is a historical tendency, and a tendency built from InpMinDayCount days can still be a run of coincidence rather than a structural pattern. - Day boundaries use broker-time midnight; a broker that pauses trading for part of the day can still shift which calendar day some late bars are counted under. - This draws shading only - it does not alert on price reaching a level, only on a hot hour beginning.
Indicator · MT4 · v1.0 · Free
About Extreme Formation Windows
Extreme Formation Windows is an indicator for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 6 settings, such as Min day count, Hot multiplier and Days back. MQL source code included.
Files in the download: ExtremeFormationWindows.ex4, ExtremeFormationWindows.mq4, ExtremeFormationWindows.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Min day count | 20 | Completed days required before any hour is shaded |
| Hot multiplier | 1.5 | Frequency multiple of the 1/24 baseline needed to count as "hot" |
| Days back | 10 | Most recent calendar days actually shaded |
| High color | clrTomato | Colour for an hour that historically produced the day's high |
| Low color | clrDodgerBlue | Colour for an hour that historically produced the day's low |
| Alerts | true | Alert once per day when a historically hot hour begins |
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 → Indicators.
- 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 indicator from the Navigator onto a chart and adjust the settings.
Tags: Trading Sessions · Alerts · MT4 Indicator · MQL4 Source Code