Loading…

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 · MT5 · v1.0 · Free

About Export Manifest With Checksums

Export Manifest With Checksums is a script for MetaTrader 5. 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.ex5, ExportManifestChecksums.mq5, ExportManifestChecksums.txt.

Settings

SettingDefaultWhat it does
File search pattern*.csvFile pattern to scan, from MQL5\Files (e.g. *.csv, Export*.json)
Output file nameExportManifest.csvManifest written to MQL5\Files
Compare to previousfalseDiff against a previously written manifest
Previous manifest file nameExportManifest.csvPrevious manifest to compare against

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 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: Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria