Quarter Hour Momentum Grid
An hourly average can hide structure that only shows up inside the hour: a session open often has a sharp first fifteen minutes that partly reverses before the hour is out, and an hour-level average nets the two halves against each other into something that looks flatter than either quarter actually was. This script slots every M15 bar by its own hour and quarter (hour*4 + quarter, giving 96 slots across the day) rather than aggregating to the hour first, so that kind of within-hour detail stays visible instead of being averaged away. For every slot it reports the sample count, the mean signed close- minus-open drift in pips, and the percentage of bars that closed above their own open - the same shape of output as an hourly study, just at four times the resolution. The scan runs over the most recent M15 bars available (capped by an input) for the chosen symbol. Notes and limitations - This is a historical base-rate study, not a live signal generator - it does not place, size or manage trades. - Slot grouping uses the terminal/broker's own server time, and the M15 bar's own minute-of-hour, so a broker whose intraday bars are offset by a few minutes around a DST transition still slots correctly - it does not assume every bar starts exactly on the quarter-hour. - A symbol with a short available M15 history will have fewer samples per slot than a long-established one; the count column shows this directly rather than hiding it behind an average alone.
Script · MT4 · v1.0 · Free
About Quarter Hour Momentum Grid
Quarter Hour Momentum Grid is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Symbol, Max bars and Save csv. MQL source code included.
Files in the download: QuarterHourMomentumGrid.mq4, QuarterHourMomentumGrid.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Symbol | Symbol to study, blank = this chart's symbol | |
| Max bars | 20000 | Most recent M15 bars to include |
| Save csv | true | Write the 96-slot table to a CSV file |
| Delimiter | DelimiterComma | CSV column separator |
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: Grid · Momentum · Trading Sessions · Alerts · MT4 Script · MQL4 Source Code