Quote Freeze Detector
A frozen feed during an otherwise ordinary session is easy to miss and easy for a broker to deny after the fact - by the time anyone notices, the chart has already filled the gap with the next tick and looks unremarkable. This script sits and watches instead, and writes down every freeze it actually sees, with a start time and a duration attached. Freeze duration is timed with GetTickCount(), the terminal's own uptime counter, not the server's own clock. A feed that has genuinely frozen cannot be trusted to report its own frozen time honestly - if MODE_TIME has stopped moving, using it to measure how long it has stopped moving is circular. GetTickCount() keeps advancing regardless of what the server is doing, so it is what actually measures the gap. Weekend closure is the one exclusion the script makes automatically: Saturday and Sunday, by day of week, are never counted towards a freeze, because a symbol going quiet from Friday's close to Sunday's open is normal market structure, not a dropout. Neither platform exposes a symbol's own session table to a Script, so a weekday closure specific to one instrument - an index or a stock outside its own exchange hours - cannot be told apart from a genuine feed freeze here. That gap is named plainly rather than papered over with a guess. A freeze still open when the run ends is reported too, flagged separately as still ongoing, rather than dropped just because it never got the chance to resolve before the script's clock ran out. That is usually the freeze most worth knowing about. Notes and limitations - Weekend exclusion is by day of week only. A symbol-specific closed session during the working week - an index outside exchange hours, a stock over a local holiday - can still be reported as a freeze, because neither platform can read that symbol's own session table to tell the difference. - The script occupies the calling thread for its entire duration and cannot run in the background the way an indicator or expert can. - A freeze still in progress when the run ends is reported as ongoing; run the script again to see whether and when it eventually resolved. - Up to 500 individual freeze events are recorded in full; beyond that the summary count still includes the extras but the per-row list does not. - A very short InpFreezeThresholdSeconds on a fast poll interval can flag ordinary brief lulls on thin symbols - start with the 30-second default and tighten it only after seeing what a normal session looks like.
Script · MT5 · v1.0 · Free
About Quote Freeze Detector
Quote Freeze Detector is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 5 settings, such as Duration minutes, Freeze threshold seconds and Poll interval ms. MQL source code included.
Files in the download: QuoteFreezeDetector.ex5, QuoteFreezeDetector.mq5, QuoteFreezeDetector.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Duration minutes | 60 | How long to watch, minutes |
| Freeze threshold seconds | 30 | Silence longer than this counts as a freeze |
| Poll interval ms | 250 | Poll frequency, milliseconds |
| Symbol list | Comma-separated symbols ("" = everything in Market Watch) | |
| Save csv | true | Write one CSV row per freeze event |
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 → Scripts.
- 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 script onto a chart to run it once.
Tags: Trading Sessions · Alerts · MT5 Script · MQL5 Source Code