Execution forensics, broker integrity analysis, and adaptive risk hardening for MetaTrader 5.
CustosAequitas is a research-oriented MetaTrader 5 Expert Advisor designed to monitor execution quality, detect statistical anomalies, and help traders assess whether a broker is introducing avoidable friction or directional bias into order execution.
It combines MQL5-based monitoring with Python validation tooling and a structured reporting pipeline to produce evidence-based broker grading.
Trading success depends not only on strategy quality, but also on the quality of execution. CustosAequitas helps answer questions like:
- Are slippage patterns unusually asymmetric?
- Is latency drifting in one direction?
- Are spikes in spread or requotes compromising execution quality?
- Is the broker behaving consistently enough to trust?
This project is intended for analysis, research, and self-protection — not for proving malicious intent.
- Broker execution monitoring across slippage, latency, spread, and requotes
- Statistical anomaly detection based on sample data and confidence intervals
- Broker grading and risk-oriented interpretation
- Adaptive hardening logic to reduce exposure when conditions appear suspicious
- HTML/CSV report generation for audit trails and manual review
- Python-backed validation for numerical consistency and verification
- Start with passive monitoring on a demo account.
- Collect sufficient trade and execution data.
- Review broker scoring and anomaly reports.
- Use conservative risk settings if the execution profile is weak.
- Treat findings as evidence, not proof of misconduct.
CustosAequitas/
├── .github/ # Project automation and repository metadata
├── CustosAequitas/ # Main EA source tree
│ ├── Experts/ # MQL5 expert entrypoints
│ ├── Include/ # Core include files and modules
│ ├── Configs/ # Sample configuration presets
│ ├── Docs/ # In-project documentation
│ ├── README.md # Project documentation
│ ├── ENGINEERING_REPORT.md # Engineering notes and implementation summary
│ ├── ROADMAP.md # Planned development roadmap
│ ├── Data/ # Generated data exports
│ └── Reports/ # HTML report output
├── Docs/ # Root-level documentation and setup guides
├── Tests/ # Test harness and validation assets
├── Tools/ # Validation and utility tooling
├── fixtures/ # Synthetic and reference datasets
├── README.md # Repository landing page
├── PHASE2_VALIDATION_REPORT.md # Validation summary
├── validation_results.json # Structured validation output
├── .gitignore # Ignore patterns
└── LICENSE # License file if present in the repo
Use a valid MT5 terminal and a demo account first.
Copy the EA and include files into the relevant MT5 folders:
MQL5/Experts/ -> CustosAequitas.mq5
MQL5/Include/CustosAequitas/ -> all .mqh files
- Open the EA in MetaEditor
- Compile the project
- Attach it to a chart
- Use passive monitoring mode initially
- Review the dashboard and generated reports
cd Tools/PythonValidator
python validate_statistics.py --input ../Tests/Fixtures/vectors.csvThe project includes a few focused guides depending on your needs:
README.md— project overview and usage entry pointDocs/INSTALLATION.md— installation and setup guidanceDocs/INTERPRETATION.md— interpreting broker metrics and scoresDocs/TROUBLESHOOTING.md— common issues and debugging stepsCustosAequitas/ENGINEERING_REPORT.md— technical implementation detailsPHASE2_VALIDATION_REPORT.md— validation coverage and outcomes
This repository is in active research and validation mode. It is structured for:
- MQL5 execution analysis
- numerical validation and investigation
- iterative hardening and reporting improvements
Contributions are welcome in areas such as:
- statistical methodology improvements
- more realistic synthetic test scenarios
- better anomaly detection logic
- clearer documentation and reporting
- safer hardening defaults
This project is distributed under the MIT License unless otherwise noted in the repository.
CustosAequitas provides statistical evidence about execution patterns. It does not see broker internals, cannot prove deliberate misconduct, and should always be interpreted in context.
Built for traders who want evidence before they trust the execution layer.