Alert Delivery Latency Auditor
Neither MQL4 nor MQL5 gives an acknowledgement channel back from a push notification, an email or a sound device - there is no built-in way to know a phone actually received a push, or that an email actually landed in an inbox. This tool is honest about that limit: it measures DISPATCH latency, the time between calling Alert()/SendNotification()/SendMail()/PlaySound() and that call returning, using GetTickCount() either side of the call - not true delivery confirmation. That narrower measurement is still useful. A terminal pop-up (Alert) and a local sound (PlaySound) normally return in a handful of milliseconds; if either one starts taking noticeably longer, that is a real symptom worth investigating even without a receipt. SendMail is the channel most likely to show a genuine, meaningful delay, since it can block on the SMTP handshake configured in terminal options. Each enabled channel is tested once per cycle and logged to CSV with its own success flag, since SendNotification and SendMail both fail outright (return false) when their respective terminal option is not configured. The two files in this submission are a straight platform port of each other. Every API this tool touches - Alert, SendNotification, SendMail, PlaySound, GetTickCount, the File* functions - behaves identically on MQL4 and MQL5, and neither version places a trade or touches an account. There is nothing platform-specific to the measurement itself. Notes and limitations This tool measures how long the terminal's own API call took to hand a message off, not whether the message was actually received by a phone, an inbox or a person. A "fast" dispatch time on SendNotification only means the terminal accepted the request quickly, not that a push arrived. Alert() and PlaySound() are dispatched to the local terminal only and will normally show consistently low latency regardless of network conditions - their main value here is as a low-noise baseline against which SendMail/SendNotification latency can be compared. Each test cycle genuinely fires a real Alert popup / sound / email / push if the corresponding channel is enabled - expect that noise on the configured schedule.
Expert advisor · MT5 · v1.0 · Free
About Alert Delivery Latency Auditor
Alert Delivery Latency Auditor is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 7 settings, such as Test alert channel, Test notification channel and Test email channel. MQL source code included.
Files in the download: AlertDeliveryLatency.ex5, AlertDeliveryLatency.mq5, AlertDeliveryLatency.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Test alert channel | true | Include Alert() (terminal pop-up) in the test cycle |
| Test notification channel | false | Include SendNotification() (push) - requires it enabled in terminal options |
| Test email channel | false | Include SendMail() - requires SMTP set up in terminal options |
| Test sound channel | true | Include PlaySound() in the test cycle |
| Sound file | alert.wav | Sound file used for the sound-channel test |
| Test interval minutes | 60 | Minutes between test cycles |
| Log file name | AlertDeliveryLatency.csv | File written under MQL5\Files\ |
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: Channels & Envelopes · Alerts · Arbitrage · MT5 Expert Advisor · MQL5 Source Code