Skip to content

Repository files navigation

SherlXAU

SherlXAU is a deterministic MQL5 trading-system architecture for XAUUSD research and execution. This public repository is a sanitized portfolio export: it shows the engineering structure, public-safe source contracts, risk and execution layers, and research methodology without publishing private signal rules, raw market data, or live configuration.

The canonical private project compiled successfully on July 21, 2026 with 0 errors, 0 warnings. This public export is not the complete private production EA and is not intended to compile as a standalone trading robot because the entrypoint and private signal engines are deliberately excluded.

What Is Included

  • Public-safe MQL5 framework modules for core types, runtime configuration, feature snapshots, risk sizing, risk guards, stop/exit planning, execution checks, order routing, and the final trade executor.
  • A research-only signal-intent schema under research_public/contracts/.
  • Technical documentation for architecture, research methodology, data pipeline boundaries, execution and risk, and live infrastructure.
  • Publication audit and secret-scan reports that explain what was excluded and why.
  • Local validation scripts that check the export for raw data, large binary artifacts, private lineage tokens, and obvious secret patterns.

What Is Excluded

  • Private signal modules under the canonical Signals layer.
  • The private EA entrypoint and production input surface.
  • Hard-coded alpha lineage lists, portfolio evidence ledgers, candidate metric tables, and frozen research artifacts.
  • Raw Sierra Chart data, SCID files, normalized Parquet files, large CSV exports, paid data, and research run outputs.
  • MT5 tester presets, live/VPS configuration, account-specific files, credentials, logs, compiled .ex5 binaries, and release archives.

Architecture

flowchart TB
    A["Market Data<br/>MT5 bars, broker state, external research feeds"] --> B["Feature Layer<br/>ATR, regime, structure, liquidity, snapshots"]
    B --> C["Private Signal Layer<br/>excluded from public export"]
    C --> D["Signal Intent Contract<br/>typed, reason-coded, shadow-safe"]
    D --> E["Policy and Risk<br/>filters, exposure guards, stop engine, sizing, prop-risk governor"]
    E --> F["Order Router<br/>request construction and pre-execution validation"]
    F --> G["Trade Executor<br/>dry-run or live MT5 OrderSend boundary"]
    G --> H["Broker / MT5 Terminal"]
    D --> I["Research and Audit Ledgers<br/>private outputs excluded"]
Loading

The important engineering boundary is that strategy modules do not execute trades directly. Signal generation produces an intent; policy, risk, routing, and execution are separate modules with explicit reason codes.

Repository Map

MQL5/Experts/SherlXAU/Include/SherlXAU/
  Alpha/                 Public signal-intent and alpha identifier contracts
  Core/                  Typed structures, constants, time utilities, logging helpers
  Debug/                 CSV/debug helpers
  Execution/             Execution checks, order router, trade executor, position state
  Features/              Deterministic feature/snapshot builders
  Risk/                  Sizing, exposure guards, stop/exit planning, prop-risk governor
  Strategy/              Runtime configuration and session engine
research_public/
  contracts/             Research-only signal intent schema
docs/                    Technical documentation
scripts/                 Public export validation script
tests/                   Public export safety checks

Safety Model

  • Bar-close decision flow: runtime features and strategy decisions are designed around deterministic closed-bar state.
  • Explicit reason codes: rejects, blocks, routing decisions, and execution outcomes are observable.
  • Separated execution boundary: TradeExecutor is the final MT5 sender; upstream modules do not call OrderSend.
  • Conservative sizing: risk sizing rounds volume down and requires explicit broker symbol specifications.
  • Prop-risk guard: the daily loss guard can block new entries when projected loss would breach configured daily equity limits.
  • Live arming: the private production entrypoint requires explicit live-trading gates; those local gates are not published here.

Research Methodology

SherlXAU research is staged. Ideas start as mechanism hypotheses, then move through reference ledgers, path-valid simulation, temporal robustness checks, negative controls, MT5 parity, execution realism, and live-integration review. Public documentation describes the process, but private ledgers and exact candidate rules are excluded.

Recent broad alpha-discovery work is not presented here as validated production alpha. Preliminary survivors, research funnel counts, and generated variants remain internal until they pass deeper evidence gates and production integration review.

Data Pipeline

The private project uses raw and normalized market data during research, including high-volume external feed captures. None of that data is included in this repository. Public schema documentation explains the boundaries without distributing vendor data or large generated artifacts.

Validation

From this export root:

powershell -ExecutionPolicy Bypass -File .\scripts\validate_public_export.ps1
python .\tests\test_public_export_safety.py

The private canonical EA compile evidence used for this publication audit:

Result: 0 errors, 0 warnings, 62882 ms elapsed

That compile result applies to the private canonical tree, not this sanitized export.

Publication Status

Direct publication of the canonical repository was rejected because the private history and working tree contain large datasets, raw market data, generated research artifacts, compiled binaries, and proprietary strategy detail. This repository is the public-safe publication candidate.

License

This is a source-available portfolio repository with all rights reserved. No open-source license is granted.

Disclaimer

This repository is for engineering review only. It is not financial advice, not a trading recommendation, and not a complete live-trading distribution.

About

Quantitative research and automated trading infrastructure for XAUUSD, combining market microstructure, cross-market futures data, statistical validation, portfolio risk management and MT5 execution.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages