Loading…

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

SettingDefaultWhat it does
Max age minutes60Age beyond which a file is considered stale
Use common folderfalsetrue = look in MQL4\Files\Common\ instead of this terminal's sandbox
Check interval sec60How often every watched file is re-checked
Re alert on each scanfalsetrue = alert every scan while stale, not just on the stale transition

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: Buy/Sell Arrows · Alerts · MT4 Expert Advisor · MQL4 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria