Skip to content

About

Execution forensics, broker integrity analysis, and adaptive risk hardening for MetaTrader 5.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CustosAequitas

MQL5 Python Research Tool

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.

Why this project exists

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.

Core capabilities

  • 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

Recommended workflow

  1. Start with passive monitoring on a demo account.
  2. Collect sufficient trade and execution data.
  3. Review broker scoring and anomaly reports.
  4. Use conservative risk settings if the execution profile is weak.
  5. Treat findings as evidence, not proof of misconduct.

Repository structure

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

Quick start

1) Install MetaTrader 5

Use a valid MT5 terminal and a demo account first.

2) Place the EA files

Copy the EA and include files into the relevant MT5 folders:

MQL5/Experts/            -> CustosAequitas.mq5
MQL5/Include/CustosAequitas/ -> all .mqh files

3) Compile and run

  • Open the EA in MetaEditor
  • Compile the project
  • Attach it to a chart
  • Use passive monitoring mode initially
  • Review the dashboard and generated reports

4) Use validation tools

cd Tools/PythonValidator
python validate_statistics.py --input ../Tests/Fixtures/vectors.csv

Documentation

The project includes a few focused guides depending on your needs:

  • README.md — project overview and usage entry point
  • Docs/INSTALLATION.md — installation and setup guidance
  • Docs/INTERPRETATION.md — interpreting broker metrics and scores
  • Docs/TROUBLESHOOTING.md — common issues and debugging steps
  • CustosAequitas/ENGINEERING_REPORT.md — technical implementation details
  • PHASE2_VALIDATION_REPORT.md — validation coverage and outcomes

Project status

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

Contributing

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

License

This project is distributed under the MIT License unless otherwise noted in the repository.

Important note

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.

About

Execution forensics, broker integrity analysis, and adaptive risk hardening for MetaTrader 5.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages