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
33 lines
811 B
TOML
33 lines
811 B
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "mt5-quant"
|
|
version = "0.1.0"
|
|
description = "MCP server for MetaTrader 5 backtesting and optimization"
|
|
readme = "README.md"
|
|
license = { text = "MIT" }
|
|
requires-python = ">=3.9"
|
|
dependencies = [
|
|
"mcp>=1.0.0",
|
|
"pyyaml>=6.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=7.0",
|
|
"pytest-asyncio>=0.21",
|
|
]
|
|
|
|
[project.scripts]
|
|
mt5-quant = "server.main:cli"
|
|
mt5-analyze = "analytics.analyze:main_generic"
|
|
mt5-analyze-grid = "analytics.analyze:main_grid"
|
|
mt5-analyze-scalper = "analytics.analyze:main_scalper"
|
|
mt5-analyze-trend = "analytics.analyze:main_trend"
|
|
mt5-analyze-hedge = "analytics.analyze:main_hedge"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["server", "analytics"]
|