Time Matched Relative Volume Curve
A plain rolling average is a poor volume baseline on an intraday chart, because it blends genuinely different times of day together - the London open is reliably busier than the Asian lunch lull, so comparing a quiet bar against a mix of busy and quiet bars misreads how unusual its volume actually is. This indicator instead builds each bar's baseline only from bars that shared its own wall-clock time on earlier days. For every bar, its own start time is reduced to a minute-of-day bucket, then the indicator scans backward through history until it has found InpBaselineDays earlier bars whose start time falls in the same bucket (bounded by InpMaxScanBars, so the scan cannot run away on very long history). Their tick volumes are averaged into that time-slot's baseline, and the bar's own volume is expressed as a percentage of it - 100 means exactly typical for that time of day, well above 100 means unusually busy, well below means unusually quiet for that specific slot. Notes and limitations - Non-repainting: a completed bar's baseline is built only from bars strictly older than it, and never changes once computed. - "Volume" is tick volume (the count of price changes per bar) - forex has no exchange volume on either MetaTrader platform, and this is the standard MT4 proxy for participation, not traded contract volume. - The match is by wall-clock bar start time (hour and minute), not by elapsed trading time. A daylight-saving clock change shifts a session's wall-clock time by an hour for a period either side of the change, which can misalign the baseline for those bars - this is a known limitation, not corrected for. - Weekly session gaps (weekends, holidays) are handled naturally, since the scan simply skips forward through history looking for the next matching bucket rather than assuming a fixed bar-count offset between trading days. - Bars early in the available history, before InpBaselineDays matching bars exist yet, read as 0 until enough history accumulates.
Indicator · MT4 · v1.0 · Free
About Time Matched Relative Volume Curve
Time Matched Relative Volume Curve is an indicator for MetaTrader 4. It has 2 settings, such as Baseline days and Max scan bars. MQL source code included.
Files in the download: TimeMatchedRelativeVolume.mq4, TimeMatchedRelativeVolume.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Baseline days | 10 | Number of earlier same-time bars averaged into the baseline |
| Max scan bars | 20000 | Hard cap on how far back one bar is allowed to search for matches |
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: Volume · Trading Sessions · MT4 Indicator · MQL4 Source Code