/metatrader-research:imported-backtestfrom metatrader-research
Handles importing MT5 Strategy Tester HTML reports uploaded by users as first-class backtest results. Covers parsing via the canonical ReportParser, equity reconstruction from broker or Darwinex fallback price data, broker server resolution, and integrating imported results into comparison and analysis pipelines. Use for: uploading .htm reports from external MT5 sessions; reconstructing equity curves when no live terminal is available; making imported tests indistinguishable from native runs. Trigger on: "import backtest", "upload HTML report", "imported test", "import report".
Ships in metatrader-research. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Users can run MT5 Strategy Tester on their own terminal and upload the
.htm report file. This skill handles the full pipeline: receive the
file, parse it into the same TestResult structure used by native runs,
reconstruct the equity curve from available price data (broker terminal or
Darwinex fallback), and surface the result in the comparison and analysis
UI with an "Imported" badge.
Use when:
POST /api/tests/import-report routeDo NOT use for:
backtest-analysis skill)analytics skill).htm file, user auth, optional
broker/server override{data-dir}/reports/{uuid}.htmReportParser.parseTestReport() (same code
native runs use) → produces TestResult with 80+ metricsreport.loginServer to a price-data context
(configured MT5 account, Darwinex metadata, or none)reconstructEquity() with the resolved
context → save equity history to {data-dir}/equity-history/{testId}.jsonTestRecord + TestResult marked source: 'imported'report.loginServer → match config.accounts[*][*].server
├─ YES → ping({ broker, account })
│ ├─ success → use broker price data
│ └─ failure → Darwinex fallback
└─ NO → Darwinex fallback
├─ has symbol data → equity reconstructed
└─ no data → equityStatus = 'unavailable'
The user can override auto-detection via the import dialog.
TestResult gains optional fields to track import provenance:
source: 'native' | 'imported'importedAt: ISO timestamporiginalFileName: uploaded filenameequityStatus: 'ok' | 'approximate' | 'unavailable'equityUnavailableReason, equityMissingSymbols: diagnostic infoThese are nullable columns in PostgreSQL; existing rows default to
source='native'.
// POST /api/tests/import-report
export async function POST(req: Request) {
const form = await req.formData()
const file = form.get('file') as File
// validate: .htm, max 50MB
// persist raw HTML to {data-dir}/reports/{uuid}.htm
// parse via ReportParser.parseTestReport(filepath)
// resolve broker context from report.loginServer
// reconstruct equity
// save TestRecord + TestResult
// return 201 with test ID
}
function reconstructEquityWithStatus(
deals: Deal[],
context: PriceDataContext
): EquityReconstructionResult {
try {
const result = reconstructEquity(deals, context)
if (!result) {
return {
points: [],
unavailableReason: 'reconstructor returned null',
missingSymbols: []
}
}
return result
} catch (e) {
return {
points: [],
unavailableReason: e.message,
missingSymbols: []
}
}
}
equityStatus field and banner handle this gracefully. Never
reject an import because equity cannot be reconstructed.reconstructEquity() returns null on
failure. Wrap it to always return a result with diagnostic fields.config.yaml and
ping to verify connectivity; server names change per deployment.| File | Content |
|---|---|
| (none yet) |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
3 skills in this plugin
/analyticsMetaTrader analytics and research workflows in Python. Use for: analysing backtest outputs and trade histories; computing performance metrics (drawdown, Sharpe, Profit Factor, Calmar, recovery, expectancy); building pandas-based evaluation pipelines; comparing EA variants and parameter sets; performing portfolio analysis with correlation checks and concentration risk; preparing scorecards, reports, and experiment logs; regime segmentation and rolling metrics. Trigger: "analytics", "performance metrics", "pandas", "drawdown", "Sharpe ratio", "Calmar", "Profit Factor", "backtest analysis", "portfolio correlation", "equity curve", "regime detection", "rolling metrics", "scorecard", "EA comparison".
/backtest-analysisBacktesting methodology and performance analysis for MQL5 EAs. Use for: interpreting backtest metrics (Profit Factor, Sharpe, Calmar, Max DD, Recovery Factor); overfitting and curve-fitting detection; walk-forward testing protocol; custom OnTester() optimisation criteria; Monte Carlo simulation framework; MT5 Strategy Tester configuration (tick modes, modelling, spreads, deposits); tester journal patterns; optimisation frames API; full ENUM_STATISTICS reference. Trigger: "backtest", "optimise", "walk-forward", "Monte Carlo", "Profit Factor", "Sharpe Ratio", "overfitting", "curve fitting", "out of sample", "strategy tester", "optimisation criteria", "is this EA prop firm ready", "robustness", "OnTester", "TesterStatistics".
npx claudepluginhub algotradingspace-dev/metatrader-skills --plugin metatrader-research