Loading…

Tick Volume Validity Study

MT4's tick volume is a count of quote changes, not a count of executed trades - there is no real trade volume on most FX feeds. Whether that count is any use as a stand-in for liquidity or activity is a per-symbol, per-broker empirical question. Many indicators and EAs lean on tick volume anyway, on the unexamined assumption that "more ticks means more happened", without ever checking whether that holds on the feed they are actually trading. This script checks it. It reads up to InpMaxBars completed bars on the chosen symbol and timeframe, buckets each bar into a session (Asian, London, New York, or Other/quiet) by the hour of its open time, and computes the Pearson correlation between tick volume and bar range in pips - both per session and pooled across all bars. A correlation close to 1.0 means tick volume genuinely tracks how much the price moved during that bar on this feed; a correlation near zero means it does not, and any strategy logic reading tick volume as an activity signal on this symbol is standing on nothing. The still-forming current bar is always excluded, since its tick volume count is partial by definition and would drag every average toward zero for no real reason related to the feed itself. Notes and limitations - Tick volume is a quote-change count, never a real trade count, on every MT4 feed. This script measures how well that count tracks range on THIS feed; it does not and cannot make tick volume into real trade volume. - A session with very few bars produces a statistically weak correlation - the count column in the report should always be read alongside the correlation figure, not skipped over. - The three session-hour inputs are plain hour-of-day boundaries in server time. They do not account for daylight-saving shifts at your broker; re-check them twice a year if your broker's server clock observes DST. - A session with zero variance in either tick volume or range (every bar identical) reports the correlation as "n/a" rather than a misleading 0.0, since the statistic is genuinely undefined there.

Script · MT5 · v1.0 · Free

About Tick Volume Validity Study

Tick Volume Validity Study is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 9 settings, such as Symbol, Timeframe and Max bars. MQL source code included.

Files in the download: TickVolumeValidityStudy.ex5, TickVolumeValidityStudy.mq5, TickVolumeValidityStudy.txt.

Settings

SettingDefaultWhat it does
SymbolSymbol to study, blank = this chart's symbol
TimeframePERIOD_M15Timeframe to study
Max bars2000Most recent completed bars to include (max 20000)
Asian start hour0Asian session starts (server hour, 0-23)
London start hour7London session starts (server hour, 0-23)
New york start hour13New York session starts (server hour, 0-23)
New york end hour21New York session ends / quiet hours resume (server hour, 0-23)
Save csvtrueWrite the per-bar sample table to a CSV file
DelimiterDelimiterCommaCSV column separator

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the script onto a chart to run it once.

Download the PDF guide

Tags: Volume · Trading Sessions · Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria