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 · MT5 · v1.0 · Free
About Volatility Heatmap By Hour
Volatility Heatmap By Hour is an indicator for MetaTrader 5. 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.ex5, VolatilityHeatmap.mq5, VolatilityHeatmap.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Scan bars | 20000 | Closed bars scanned to build the hourly averages (capped for performance) |
| Corner | CORNER_LEFT_LOWER | Panel corner |
| X offset | 10 | Horizontal offset from the corner, in pixels |
| Y offset | 40 | Vertical offset from the corner, in pixels |
| Cell width px | 18 | Pixel width of each of the 24 hour cells |
| Cell height px | 24 | Pixel height of each hour cell |
| Alert on peak hour | false | Alert once per day when the historically busiest hour begins |
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 → Indicators.
- 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 indicator from the Navigator onto a chart and adjust the settings.
Tags: Alerts · Trading Sessions · MT5 Indicator · MQL5 Source Code