Commit Graph
9 Commits
Author SHA1 Message Date
ZhijuCen f0957c4cd9 feat: scan Program Files subdirs for MT5 installation
MT5_BASE resolution order:
  1. MT5_BASE env var
  2. MQL5_DIR detected from cwd → MT5_BASE = parent
  3. Scan Program Files + Program Files (x86) for terminal64.exe/metaeditor64.exe
  4. Hardcoded Wine fallback
2026-06-24 17:28:56 +08:00
ZhijuCen 7cb13ccc0d feat: auto-detect MQL5_DIR by walking up from cwd
Resolution order for MQL5_DIR:
  1. MQL5_DIR env var (explicit override)
  2. Walk up cwd looking for a dir with Experts/ + Indicators/ children
  3. MT5_BASE/MQL5 (Linux/Wine default)

When detected from cwd, also infers MT5_BASE as the parent directory.
2026-06-24 17:26:15 +08:00
ZhijuCen 9da69ee908 fix: make MQL5_DIR configurable, use absolute paths for MetaEditor
- MQL5_DIR override via MQL5_DIR env var (Windows 10+ stores MQL5 in
  %APPDATA%, not under the install dir)
- compile/check now pass absolute paths to /compile:"path" instead of
  computing relative_to(MT5_BASE) which would fail when MQL5_DIR is
  separate
2026-06-24 17:22:47 +08:00
ZhijuCen 44f32f601f fix: make MT5_BASE configurable via environment variable
MT5_BASE env var overrides the default Wine path, supporting non-default
installations and other platforms.
2026-06-24 17:20:19 +08:00
ZhijuCen dd90d42537 fix: correct backtesting limitations and simplify mql5_helper
SKILL.md Section 6:
- Add GUI-only declaration for Strategy Tester
- Document metatester64.exe (remote agent mgmt only) and terminal64.exe (no CLI)
- Add CLI Automation table: compile , syntax check , backtest , optimization 
- Document MetaEditor CLI syntax: /compile:"path" /log and /log /s
- Add Parameter Optimization section with [start, stop, step] format
- Revise Backtesting Workflow with CLI step
- Replace "Automated Backtesting Loop" with accurate "EA Development Cycle"

mql5_helper.py:
- Simplify detect_type: path-only detection (remove content-based reading)
- Fix compile arg format: /compile:"relpath" /log (was wrong format)
- Add check subcommand: syntax-only verification via /s flag
- Extract _find_editor() shared by compile and check
- Remove unused 'import os'
- Simplify main() with dict dispatch
2026-06-24 16:15:45 +08:00
ZhijuCen 17f5a5f607 feat: EA report parser and performance evaluation guide
- Add scripts/parse_tester_report.py: parses MT5 Strategy Tester HTML
  reports (UTF-16LE). Extracts settings, EA parameters, 44 P&L metrics,
  orders (192), deals (193), stop-out detection. Supports --json output.
- Add Report Analysis subsection to SKILL.md Section 6: 10 evaluation
  dimensions (data quality, profitability, drawdown, trade distribution,
  consecutive losses, holding time, MFE/MAE, stop-out, bias, commission).
2026-06-24 13:57:49 +08:00
ZhijuCen 8749cadfbb fix: use AccountInfoString for ACCOUNT_CURRENCY in SKILL.md 2026-06-24 03:57:41 +08:00
ZhijuCen cb0f520623 feat: SL/TP risk formulas, project docs, symbol specs
SKILL.md Section 5 rewritten with PointValue-based formulas:
- Direction A: SL points → SL price
- Direction B: Risk% + lots → SL price (with currency conversion)
- Direction C: SL price + risk% → lot size
- FindFXRate helper for profit_currency ≠ account_currency
- OrderCalcProfit verification pattern

Section 8 expanded with 6 SL/TP pitfalls (PointValue vs TICK_VALUE,
TickSize ≠ Point, currency conversion, NormalizeDouble rounding,
lot step quantization, STOPS_LEVEL check).

Section 9 EA skeleton now includes inline PointValue, FindFXRate,
CalcSLFromRisk, CalcLotsFromSL functions.

New files:
- LICENSE (MIT)
- README.md
- docs-dev/symbol-spec.md (symbol spec workflow)
- skills/mql5/references/symbol-spec/specs-{XAUUSD,USDJPY}.csv
- skills/mql5/scripts/verify_sl_tp_formulas.py (Python verification)

Updated: pyproject.toml, AGENTS.md, .gitignore, docs-dev/skill-design.md
2026-06-24 03:32:28 +08:00
ZhijuCen d17f68e979 Initial Commit. 2026-06-23 21:47:51 +08:00