Loading…

Tick Density Comparison

"This broker's feed feels thin" is a complaint every trader has made and almost none have measured. Tick count per minute is the simplest honest proxy for feed richness, and comparing it symbol to symbol, or the same symbol across two terminals running side by side, turns the complaint into a chart. MT4 has no event that fires "a new tick arrived on a symbol you are not currently charting" - OnTick() only exists for the chart an EA is attached to. This script works around that the only way available to a script: polling MarketInfo(symbol, MODE_TIME) on a short timer for every symbol at once, and counting a change in that value as one tick. A fast poll interval catches almost every tick; it cannot catch two ticks that land inside the same poll window, so the counts this script produces are a lower bound on the true tick rate, not an exact tape. That is stated plainly because a density report that quietly overstated its own precision would be worse than no report at all. Symbols are watched either from an explicit comma-separated list or, by default, everything already selected in Market Watch - the same list a trader is actually looking at is the one worth measuring. The count is capped at fifty symbols so the per-minute bucket table stays a fixed, predictable size regardless of how large Market Watch has grown. Notes and limitations - Counts are a lower bound, not an exact tick tape - two ticks inside one poll interval are counted as one. Lowering InpPollIntervalMs tightens this but never eliminates it. - The script occupies the calling thread for its entire duration. It cannot be run in the background the way an indicator or expert can. - Comparing two brokers meaningfully requires running the script on both terminals over the same wall-clock window, not sequentially - feed activity varies by time of day on its own. - Only symbols already known to the terminal (present in the full symbol list) can be sampled; a symbol name that does not exist on this broker is silently not added.

Script · MT5 · v1.0 · Free

About Tick Density Comparison

Tick Density Comparison is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Duration minutes, Poll interval ms and Symbol list. MQL source code included.

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

Settings

SettingDefaultWhat it does
Duration minutes15How long to sample, minutes
Poll interval ms250Poll frequency, milliseconds
Symbol listComma-separated symbols ("" = everything in Market Watch)
Save csvtrueWrite a per-symbol, per-minute CSV

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: Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria