Spacing Audit
- Yardımcı programlar
- Sürüm: 1.0
Spacing Audit measures the grid spacing your EA REALLY uses, from its own closed trades, not from its inputs and not from the gaps between open layers.
Why: I spent a week believing my grid used ATR-based spacing because UseATR was true. It did not. Every pair sat on the minimum-spacing floor, 2.8x to 5.1x tighter than intended, and the book kept clogging. The inputs said one thing; 1,120 closed trades said another.
The method: in a grid where each layer carries a take-profit one spacing away from its entry, the realised distance entry to exit IS the spacing. The script reads the account history, measures every closed trade and prints one row per symbol: N, MEDIAN %, MEAN %, MIN %, MAX %.
How to read it: compare the median with the spacing you believe is configured. If every symbol sits on the same number, that number is your floor and your spacing logic is not running. MAX above the median is usually widened or recovered layers.
Do not measure the gaps between OPEN layers: layers that closed in between, and re-anchoring, leave gaps that are not the grid step. Measured that way I got 0.082% on a pair that runs at 0.398%, off by nearly 5x in the direction that makes a dangerous grid look safe.
Inputs: magic to audit (0 = every magic), days back (default 60), minimum distance to ignore partial fills and noise, and an optional CSV written to MQL5\Files, one file per account.
Run it as a script on any chart of the account. It reads closed history only: it opens nothing, closes nothing and modifies nothing. Works with any grid EA.
Free. It is the audit I run on SurfBot (https://www.mql5.com/en/market/product/179990); the screenshots show a 7-pair tester run where the per-pair table is governing as designed.
It needs closed trades to say anything: on a fresh account or with the wrong magic it prints a one-line notice and stops.
Questions and bug reports in the comments; I answer within a day.
