Export Manifest With Checksums
Any pipeline built around export files sitting in the sandbox has the same weak point: nothing tells the next stage whether the file it is about to read is the one that was actually meant to be there. A file can be zero bytes because a previous run crashed mid-write, truncated because a disk filled up, or silently different because a script was re-run with different settings - and a size-only check catches only the first of those. This tool computes a real content hash - FNV-1a, 64-bit, over the raw file bytes read in binary mode rather than a re-rendered text version of the content, so it also catches an encoding or line-ending change a naive "read as text and hash the string" approach would hide - plus a row count and byte size, for every file matching a chosen pattern in MQL4\Files, and writes them all to one manifest CSV. Given a previous manifest to compare against, it also classifies every file as ADDED, REMOVED, CHANGED or UNCHANGED against that baseline, which is the actual question a "did my exports change since last time" check usually needs answered, not just a fresh hash with nothing to compare it to. Notes and limitations - The hash is not cryptographic. It is fit for detecting accidental corruption or an unnoticed content change, not for defending against a deliberate, hash-aware tamper attempt. - The manifest file itself, and any file that fails to open mid-scan, is excluded from its own listing and reported separately rather than silently included. - Row count is a plain newline count (plus one for a final line with no trailing newline). It counts lines, not logical CSV records, so a quoted multi-line field would be counted as more than one row - not a distinction this tool's own manifest or CSV exports in this catalogue ever produce, but worth knowing for an arbitrary file. - File enumeration uses FileFindFirst/FileFindNext, which is scoped to MQL4\Files exactly like every other file operation in MQL4 - it cannot manifest files outside the sandbox.
Script · MT4 · v1.0 · Free
About Export Manifest With Checksums
Export Manifest With Checksums 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 File search pattern, Output file name and Compare to previous. MQL source code included.
Files in the download: ExportManifestChecksums.mq4, ExportManifestChecksums.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| File search pattern | *.csv | File pattern to scan, from MQL4\Files (e.g. *.csv, Export*.json) |
| Output file name | ExportManifest.csv | Manifest written to MQL4\Files |
| Compare to previous | false | Diff against a previously written manifest |
| Previous manifest file name | ExportManifest.csv | Previous manifest to compare against |
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: Alerts · MT4 Script · MQL4 Source Code