3f763827f4
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
2.1 KiB
2.1 KiB
| 1 | time | type | direction | volume | price | sl | tp | profit | balance | comment | order | magic | entry |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | 2025.01.10 09:00:00 | buy | in | 0.01 | 1900.00 | 1880.00 | 1920.00 | 0.0 | 10000.0 | Layer #1 | 1001 | 12345 | in |
| 3 | 2025.01.10 09:30:00 | buy | out | 0.01 | 1915.00 | 0.0 | 0.0 | 15.00 | 10015.0 | Layer #1 | 1001 | 12345 | out |
| 4 | 2025.01.15 10:00:00 | sell | in | 0.01 | 1910.00 | 1930.00 | 1890.00 | 0.0 | 10015.0 | Layer #1 | 1002 | 12345 | in |
| 5 | 2025.01.15 10:45:00 | sell | out | 0.01 | 1920.00 | 0.0 | 0.0 | -10.00 | 10005.0 | Layer #1 | 1002 | 12345 | out |
| 6 | 2025.01.20 14:00:00 | buy | in | 0.02 | 1905.00 | 1880.00 | 1935.00 | 0.0 | 10005.0 | Layer #2 | 1003 | 12345 | in |
| 7 | 2025.01.21 09:00:00 | buy | in | 0.04 | 1895.00 | 1870.00 | 1925.00 | 0.0 | 10005.0 | Layer #3 | 1004 | 12345 | in |
| 8 | 2025.01.21 15:30:00 | buy | out | 0.06 | 1925.00 | 0.0 | 0.0 | 30.00 | 10035.0 | Layer #3 | 1003 | 12345 | out |
| 9 | 2025.02.05 10:00:00 | sell | in | 0.01 | 1930.00 | 1950.00 | 1910.00 | 0.0 | 10035.0 | Layer #1 | 1005 | 12345 | in |
| 10 | 2025.02.05 14:00:00 | sell | out | 0.01 | 1945.00 | 0.0 | 0.0 | -15.00 | 10020.0 | Layer #1 | 1005 | 12345 | out |
| 11 | 2025.02.12 11:00:00 | buy | in | 0.01 | 1920.00 | 1900.00 | 1940.00 | 0.0 | 10020.0 | Layer #1 | 1006 | 12345 | in |
| 12 | 2025.02.12 16:00:00 | buy | out | 0.01 | 1938.00 | 0.0 | 0.0 | 18.00 | 10038.0 | Layer #1 | 1006 | 12345 | out |
| 13 | 2025.01.06 02:30:00 | buy | in | 0.01 | 1885.00 | 1865.00 | 1905.00 | 0.0 | 10038.0 | Layer #1 | 2001 | 23456 | in |
| 14 | 2025.01.06 03:15:00 | buy | out | 0.01 | 1898.00 | 0.0 | 0.0 | 12.00 | 10050.0 | Layer #1 TP | 2001 | 23456 | out |
| 15 | 2025.01.07 20:00:00 | sell | in | 0.01 | 1910.00 | 1930.00 | 1890.00 | 0.0 | 10050.0 | Layer #1 | 2002 | 23456 | in |
| 16 | 2025.01.07 21:30:00 | sell | out | 0.01 | 1918.00 | 0.0 | 0.0 | -8.00 | 10042.0 | Layer #1 cutloss | 2002 | 23456 | out |
| 17 | 2025.01.08 09:30:00 | buy | in | 0.01 | 1892.00 | 1872.00 | 1912.00 | 0.0 | 10042.0 | Layer #1 | 2003 | 23456 | in |
| 18 | 2025.01.08 10:20:00 | buy | out | 0.01 | 1905.00 | 0.0 | 0.0 | 20.00 | 10062.0 | Layer #1 | 2003 | 23456 | out |
| 19 | 2025.01.13 08:00:00 | sell | in | 0.01 | 1925.00 | 1945.00 | 1905.00 | 0.0 | 10062.0 | Layer #1 | 2004 | 23456 | in |
| 20 | 2025.01.13 08:01:00 | sell | in | 0.02 | 1928.00 | 1948.00 | 1908.00 | 0.0 | 10062.0 | Layer #2 | 2005 | 23456 | in |
| 21 | 2025.01.13 08:02:00 | sell | in | 0.04 | 1931.00 | 1951.00 | 1911.00 | 0.0 | 10062.0 | Layer #3 | 2006 | 23456 | in |
| 22 | 2025.01.13 09:30:00 | sell | out | 0.07 | 1905.00 | 0.0 | 0.0 | -45.00 | 10017.0 | Layer #3 cutloss | 2004 | 23456 | out |
| 23 | 2025.01.16 15:00:00 | buy | in | 0.01 | 1900.00 | 1880.00 | 1920.00 | 0.0 | 10017.0 | Layer #1 | 2007 | 23456 | in |
| 24 | 2025.01.16 17:30:00 | buy | out | 0.01 | 1915.00 | 0.0 | 0.0 | 22.00 | 10039.0 | Layer #1 | 2007 | 23456 | out |