feat(step1): Universal EA Schema Layer — replaces param_manifest.yaml

NEW FILES:
  ea/__init__.py          - EA module package
  ea/schema.py            - ParameterDef + ParameterSchema (replaces YAML manifest)
  ea/set_parser.py        - Parse ANY MT5 .set file → ParameterSchema
  ea/registry.py          - EAProfile + EARegistry (ea_registry.yaml)
  ea_registry.yaml        - LEGSTECH_EA_V2 pre-registered with automation overrides

MODIFIED:
  mt5/ini_builder.py      - Accepts ParameterSchema OR legacy manifest_path
  mt5/runner.py           - Accepts optional EAProfile for EA-agnostic validation
  config.yaml             - Removed hardcoded ea: block; added ea_registry path

KEY DESIGN:
  - .set file IS the manifest: value|min|max|step auto-detects float/int/bool/enum/fixed
  - automation_overrides in EAProfile forces headless-safe values (InpShowPanel=0)
  - Phase A optimization INI: Optimization=2 (genetic), ranges from schema
  - Phase B single backtest: Optimization=0 (unchanged behavior)
  - LEGSTECH advanced mode: fully backwards compatible via legacy manifest fallback
  - runner.py still works for legacy callers (no EAProfile needed)

TESTED:
  - 49/49 LEGSTECH params parsed correctly
  - InpShowPanel=0 automation override applied
  - INI output correct for both Phase A (Optimization=2) and Phase B (Optimization=0)
  - All imports pass
This commit is contained in:
LEGSTECH Optimizer
2026-04-13 19:55:16 +00:00
parent b70a6760ae
commit d5a8973c05
10 changed files with 878 additions and 74 deletions
+3 -8
View File
@@ -1,14 +1,8 @@
# MT5 EA Strategy Optimizer — Master Configuration
# LEGSTECH_EA_V2 | XAUUSD | H1
# EA identity (name, symbol, timeframe, .set file) is now managed
# in ea_registry.yaml via the EA Registry. See ea/registry.py.
# ─────────────────────────────────────────────
ea:
name: "LEGSTECH_EA_V2"
file: "LEGSTECH_EA_V2" # .ex5 file name (no extension), in Experts/
symbol: "XAUUSD"
timeframe: "H1" # Period code used in INI (H1 = 16385... see MT5 period codes)
mt5_period_code: 16385 # PERIOD_H1 numeric code for [Tester] Period
periods:
train_start: "2022.01.01"
train_end: "2023.12.31"
@@ -101,3 +95,4 @@ paths:
runs_dir: "runs"
reports_dir: "reports"
log_file: "optimizer.log"
ea_registry: "ea_registry.yaml" # EA profiles (symbol, .set path, mode)