Loading…

Quote Burst Batching Profiler

Two feeds can report the same average tick rate - say, one tick per second - while behaving completely differently in practice: one arrives in a steady trickle, the other sits quiet for four seconds and then delivers five ticks almost at once. That difference matters for anything timing-sensitive, from a scalping strategy to a spread monitor sampling on a fixed timer, and it is invisible in a plain tick-per- minute count. This script measures it directly. It records the time between every observed tick on the current symbol and classes each one as either isolated or part of a "burst" - a run of ticks each arriving inside a chosen gap threshold of the one before it. It also computes the coefficient of variation (standard deviation divided by mean) of the raw inter-tick interval series: a value near zero means near-metronomic spacing, a value above one means the feed is dominated by clumping rather than a steady arrival process. The report gives both the burst-run statistics (how many bursts, their average and longest size, and what share of all ticks fell inside one) and the interval coefficient of variation, so a feed can be judged on two independent, complementary measures of the same underlying question rather than a single number that could be read either way. Notes and limitations - Only the current chart's symbol is watched, and only the Bid stream. - Burst detection resolution is limited by InpPollIntervalMs - a poll interval too close to InpBurstGapMs will misclassify some genuine bursts as isolated ticks and vice versa. - The interval array is capped at 20000 samples so memory use stays bounded on a very long or very active sampling run; further ticks beyond that cap still count toward burst classification but are not added to the coefficient-of-variation calculation. - The script occupies the calling thread for its entire duration and cannot run in the background the way an indicator or expert can.

Script · MT4 · v1.0 · Free

About Quote Burst Batching Profiler

Quote Burst Batching Profiler 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 Duration minutes, Burst gap ms and Poll interval ms. MQL source code included.

Files in the download: QuoteBurstProfiler.mq4, QuoteBurstProfiler.txt.

Settings

SettingDefaultWhat it does
Duration minutes10How long to watch the feed, minutes
Burst gap ms150Inter-tick gap below this counts as "still in the burst", ms
Poll interval ms20Poll frequency for new ticks, milliseconds (keep small - this IS the timing measurement)
Save csvtrueWrite the burst-run histogram to a CSV

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 → Scripts.
  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 script onto a chart to run it once.

Download the PDF guide

Tags: Scalping · Alerts · MT4 Script · MQL4 Source Code

MQL4 & MQL5 scripts · PolyMaria