Files
Devid HW 3f763827f4 feat: MT5-Quant MCP server for backtesting and optimization
MCP server exposing MetaTrader 5 strategy development tools to AI
assistants (Claude, Cursor, etc.) on macOS (CrossOver) and Linux (Wine).

Tools:
- run_backtest: full pipeline — compile EA, clean cache, backtest,
  parse HTML/XML report, analyze deals → metrics.json + analysis.json
- run_optimization: background genetic optimization with nohup/disown,
  UTF-16LE .set file handling, OptMode reset
- compile_ea: MQL5 compilation via MetaEditor with auto-detected
  include/ directory sync
- get_backtest_status / get_optimization_status: job polling
- verify_environment: Wine/MT5 path validation

Analytics:
- extract.py: MT5 HTML and SpreadsheetML XML report parser
- analyze.py: deal-level analysis (drawdown events, grid depth,
  loss sequences, monthly P&L) → analysis.json
- optimize_parser.py: optimization result parser with convergence analysis

Platform support:
- macOS CrossOver (GUI mode, no Xvfb needed)
- Linux Wine + Xvfb (headless, CI/CD compatible)
- Auto-detection of Wine executable and MT5 terminal paths
2026-04-18 11:41:41 +07:00

2.1 KiB

1timetypedirectionvolumepricesltpprofitbalancecommentordermagicentry
22025.01.10 09:00:00buyin0.011900.001880.001920.000.010000.0Layer #1100112345in
32025.01.10 09:30:00buyout0.011915.000.00.015.0010015.0Layer #1100112345out
42025.01.15 10:00:00sellin0.011910.001930.001890.000.010015.0Layer #1100212345in
52025.01.15 10:45:00sellout0.011920.000.00.0-10.0010005.0Layer #1100212345out
62025.01.20 14:00:00buyin0.021905.001880.001935.000.010005.0Layer #2100312345in
72025.01.21 09:00:00buyin0.041895.001870.001925.000.010005.0Layer #3100412345in
82025.01.21 15:30:00buyout0.061925.000.00.030.0010035.0Layer #3100312345out
92025.02.05 10:00:00sellin0.011930.001950.001910.000.010035.0Layer #1100512345in
102025.02.05 14:00:00sellout0.011945.000.00.0-15.0010020.0Layer #1100512345out
112025.02.12 11:00:00buyin0.011920.001900.001940.000.010020.0Layer #1100612345in
122025.02.12 16:00:00buyout0.011938.000.00.018.0010038.0Layer #1100612345out
132025.01.06 02:30:00buyin0.011885.001865.001905.000.010038.0Layer #1200123456in
142025.01.06 03:15:00buyout0.011898.000.00.012.0010050.0Layer #1 TP200123456out
152025.01.07 20:00:00sellin0.011910.001930.001890.000.010050.0Layer #1200223456in
162025.01.07 21:30:00sellout0.011918.000.00.0-8.0010042.0Layer #1 cutloss200223456out
172025.01.08 09:30:00buyin0.011892.001872.001912.000.010042.0Layer #1200323456in
182025.01.08 10:20:00buyout0.011905.000.00.020.0010062.0Layer #1200323456out
192025.01.13 08:00:00sellin0.011925.001945.001905.000.010062.0Layer #1200423456in
202025.01.13 08:01:00sellin0.021928.001948.001908.000.010062.0Layer #2200523456in
212025.01.13 08:02:00sellin0.041931.001951.001911.000.010062.0Layer #3200623456in
222025.01.13 09:30:00sellout0.071905.000.00.0-45.0010017.0Layer #3 cutloss200423456out
232025.01.16 15:00:00buyin0.011900.001880.001920.000.010017.0Layer #1200723456in
242025.01.16 17:30:00buyout0.011915.000.00.022.0010039.0Layer #1200723456out