Loading…

Volatility Heatmap By Hour

Session boxes mark broad windows like "London" or "New York", but volatility inside those windows is not flat - the first hour after an open behaves very differently from the last hour before a lunch lull. This indicator scans up to InpScanBars recent closed bars, sums bar range (High-Low) into 24 buckets keyed by the server-time hour each bar closed in, and averages each bucket, then paints a 24-cell horizontal strip using a blue-to-yellow-to-red gradient scaled between that symbol's own calmest and busiest historical hour. The current hour's cell gets a white outline so "where are we right now" is always obvious against the historical pattern. The aggregation deliberately runs off the chart's own timeframe bars rather than pulling a separate fixed feed. On M1 through M30 charts an hour is built from several to dozens of bars, giving a real distribution per hour. On H4 or higher, most bars span multiple hours each, so the hourly buckets end up sparse and the picture becomes unreliable - the indicator prints one warning to the Experts log at that point rather than silently producing a heatmap that looks confident but is not. Hours are server time - the same clock every other time-based tool in this catalogue uses - not the trader's local time zone, because server time is what stays consistent as a broker's DST rules shift through the year. Rebuilding the full scan is real work, so it only reruns once per new calendar day, not on every tick or even every new bar - one extra bar out of many thousands does not meaningfully move an hourly average, and a once-daily refresh keeps the indicator cheap to leave running. Notes and limitations - Meaningful primarily on M1-M30 charts. On H1 and above the per-hour buckets thin out; on H4/D1 they become unreliable, and the indicator logs a warning rather than hiding the problem. - Hours are the broker's SERVER time, not the trader's local time zone - check the terminal's server time before comparing against local session times. - The heatmap only rebuilds once per calendar day; a volatility regime change intraday will not be reflected in the colours until the next day's rebuild. - Colours are scaled relative to that symbol's own calmest-to-busiest hour, not to an absolute pips value, so colours are not directly comparable between two different symbols. - Purely descriptive of the past: it is not a forecast that the historically busiest hour will behave the same way today.

Indicator · MT4 · v1.0 · Free

About Volatility Heatmap By Hour

Volatility Heatmap By Hour is an indicator for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 7 settings, such as Scan bars, Corner and X offset. MQL source code included.

Files in the download: VolatilityHeatmap.ex4, VolatilityHeatmap.mq4, VolatilityHeatmap.txt.

Settings

SettingDefaultWhat it does
Scan bars20000Closed bars scanned to build the hourly averages (capped for performance)
CornerCORNER_LEFT_LOWERPanel corner
X offset10Horizontal offset from the corner, in pixels
Y offset40Vertical offset from the corner, in pixels
Cell width px18Pixel width of each of the 24 hour cells
Cell height px24Pixel height of each hour cell
Alert on peak hourfalseAlert once per day when the historically busiest hour begins

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 → Indicators.
  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 indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Alerts · Trading Sessions · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria