Export Freshness Monitor
Any pipeline that depends on a file being refreshed on a schedule - a scheduled export, a bridge writing prices out for another program, a signal file another tool reads - fails silently the moment whatever produces it stops running. Nothing in MetaTrader tells you; the last good file just sits there looking normal until someone notices the data is old. This tool checks a list of watched files on a timer and compares each one's own modify timestamp against a configured age limit. It never opens or interprets the file's contents, so it works against any format - CSV, JSON, a plain heartbeat touch file - without needing to understand what is inside it. A missing file and a stale file are reported separately, and an alert fires once on the transition into either state rather than repeating every scan, so it stays quiet once you have acknowledged the problem (this can be switched off with InpReAlertOnEachScan if a supervising process needs one alert per scan instead). Notes and limitations - Staleness is judged purely by the file's modify timestamp - a file that gets rewritten with identical or corrupt content still counts as fresh. - Up to 20 files can be watched in one instance; run a second instance with a different InpFileList for more. - File I/O in MQL4 is sandboxed; a path outside MQL4\Files\ (or MQL5\Files\ on the native MQL5 build) (or MQL4\Files\ (or MQL5\Files\ on the native MQL5 build)Common\) cannot be watched at all.
Expert advisor · MT4 · v1.0 · Free
About Export Freshness Monitor
Export Freshness Monitor 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 Max age minutes, Use common folder and Check interval sec. MQL source code included.
Files in the download: ExportFreshnessMonitor.ex4, ExportFreshnessMonitor.mq4, ExportFreshnessMonitor.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Max age minutes | 60 | Age beyond which a file is considered stale |
| Use common folder | false | true = look in MQL4\Files\Common\ instead of this terminal's sandbox |
| Check interval sec | 60 | How often every watched file is re-checked |
| Re alert on each scan | false | true = alert every scan while stale, not just on the stale transition |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Buy/Sell Arrows · Alerts · MT4 Expert Advisor · MQL4 Source Code