Mt5 Robot Tester logo

Mt5 Robot Tester

CommunityPopular
tradermonty
mt5-robot-tester

Select the best MetaTrader 5 trading robots (Expert Advisors) that have not been backtested yet, by running the MT5 Strategy Tester from the command line through a 3-round pipeline. Use when the user wants to batch-test MT5 bots/EAs, screen robots across all symbols, optimize EA parameters, or move candidate bots to finalists based on profit, drawdown, positive months/years and equity-curve criteria. Runs terminal64.exe headless; Windows + MetaTrader 5 required at run time.

Overview

Publishertradermonty
Repositoryclaude-trading-skills
Skill namemt5-robot-tester
Stars
2.8K
Forks
647
Bundled files
16
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 16 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by tradermonty on GitHub. Read the source before you install it.

Installation

Install the Mt5 Robot Tester AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tradermonty/claude-trading-skills.git /tmp/claude-trading-skills
mkdir -p .claude/skills
cp -r /tmp/claude-trading-skills/skills/mt5-robot-tester .claude/skills/mt5-robot-tester
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Mt5 Robot Tester in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Mt5 Robot Tester on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Mt5 Robot Tester is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

MT5 Robot Tester

Overview

Select the best MetaTrader 5 robots (Expert Advisors) from a candidates folder by driving the Strategy Tester from the command line through a 3-round pipeline, moving each bot between folders as it advances, and learning across runs to improve selection each loop. The whole run is checkpointed and resumable.

  • Round 1 — screening (all pairs): backtest the EA on each symbol in the configured common.symbols list (one Optimization=0 backtest per symbol — MT5 build 6061 leaves the Optimization=3 XML empty, so per-symbol backtests are used). Gate: ≥5 symbols profitable AND best symbol ≥3× deposit.
  • Round 2 — best-pair backtest: single backtest on the best symbol; analyze net profit %, worst drawdown %, % positive months, all-years-positive, LR Correlation, months-to-new-high.
  • Round 3 — sequential parameter optimization: optimize the 5–6 inputs after MagicNumber, one at a time, range ±50% step 5%; then a final backtest.
  • Finalist: optimized result improves on Round 2 and profit ≥4× deposit and worst drawdown ≤12%.

Tested bots move to in-testing; finalists are also copied to finalists with their optimized .set.

When to Use

  • "Prueba robots / bots / EAs en MetaTrader 5."
  • Screen a folder of MT5 Expert Advisors and pick the best across all pairs.
  • Optimize EA parameters and decide finalists by profit/drawdown/consistency.
  • Resume an interrupted testing run.

Prerequisites

  • Windows + MetaTrader 5 installed (the tester runs terminal64.exe).
  • Broker tick data downloaded (default modeling is real ticks, Model=4).
  • The three folders under MQL5\Experts: candidates, in-testing, finalists.
  • common.symbols set in the config — the pairs Round 1 backtests (your Market Watch symbols).
  • Optional per-bot .set files (config sets_dir) for the Round-2 baseline and Round-3 parameter optimization. Every input is fixed during optimization except the one parameter currently being searched; without a .set, Round 3 is skipped and the verdict comes from Round 2.
  • Close MetaTrader 5 before running — the tester needs exclusive use of the data folder.
  • Python 3.9+ (standard library only). No paid API.

Workflow

Step 1 — Configure

Copy assets/pipeline_config.template.json, fill in the three folder paths and (optionally) terminal_path. Never commit real personal paths — pass the config at run time. Defaults already encode the agreed settings (2020.01.01→2026.06.30, H1, Model=4, 10000 USD, 1:100, gates and thresholds).

Step 2 — Dry-run (optional)

Verify the generated Round-1 INIs without launching MT5:

bash
python3 skills/mt5-robot-tester/scripts/mt5_batch_tester.py \
  --config my_config.json --output-dir reports/mt5_pipeline --dry-run

Step 3 — Run the pipeline

bash
python3 skills/mt5-robot-tester/scripts/mt5_batch_tester.py \
  --config my_config.json --output-dir reports/mt5_pipeline

Each bot flows R1 → R2 → R3 → finalist decision. Progress is written to state.json and run.log after every step.

Step 4 — Resume if interrupted

bash
python3 skills/mt5-robot-tester/scripts/mt5_batch_tester.py \
  --config my_config.json --output-dir reports/mt5_pipeline --resume

--resume skips completed bots and reuses finished rounds only while the execution config, EA binary, and input .set fingerprints still match. A changed period, symbol list, binary, or .set restarts that bot safely.

Optional — HTML control panel

Launch a local dashboard to see the bots in each folder, each bot's phase and verdict, and a Launch button — no CLI needed after starting it:

bash
python3 skills/mt5-robot-tester/scripts/dashboard.py \
  --config my_config.json --output-dir reports/mt5_pipeline

It serves http://127.0.0.1:8765/ (opens automatically, localhost only). The page auto-refreshes every 3 s: folder contents, per-bot phase (R1/R2/R3/done), pass/fail verdicts, summary counts, and the live run.log. Start/stop requests are limited to the exact local origin and require the per-server CSRF token.

Step 5 — Read the results

  • leaderboard_<ts>.md / .json — ranking with verdict and key metrics.
  • learnings.json / learnings.md — what the skill learned this loop (parameter impact and symbol priors) under the configured output directory.
  • mt5_reports/ and mt5_ini/ — raw MT5 reports and configs per bot/round.

Round details

Round 1 gate (both required)

  1. count_positive_profit(passes) ≥ round1_min_positive (default 5).
  2. best_symbol_profit ≥ round1_min_profit_multiple × deposit (default 3×).

Fail → bot rejected (moved to in-testing).

Round 2 quality profile (reference thresholds)

Net profit ≥300%, worst DD <15% (larger of balance/equity %), positive months

70%, all years positive, LR Correlation ≥0.80, months-to-new-high ≤3. Reported per bot; the hard finalist gate is Round 3.

Round 3 sequential optimization

For each of the 5–6 inputs after MagicNumber (learned order first), optimize that single parameter over [V×0.5, V×1.5] step V×0.05 (Optimization=1) while fixing every other .set input, fix its best value, then continue. Run a final backtest with the exact complete input set saved for a finalist.

Finalist

evaluate_finalist: improved on Round 2 and profit ≥4× deposit and worst DD ≤12%. → copied to finalists with <bot>.set.

Self-learning across loops

learnings.json accumulates, per run: parameter average profit improvement (reorders Round-3 optimization so the most impactful parameters are tried first), symbol priors (how often each is a best pair), and per-bot verdicts. This makes selection converge faster each loop. Deterministic — plain aggregate statistics.

Output Format

  • leaderboard_<ts>.json — list of {name, verdict, best_symbol, r2_profit, final_profit, final_dd_pct, lr, reason} sorted finalists-first by profit.
  • leaderboard_<ts>.md — same as a table.
  • state.json — resumable per-bot/per-round checkpoint.

Resources

  • scripts/mt5_batch_tester.py — pipeline orchestrator + INI builders (CLI).
  • scripts/parse_mt5_optimization.py — optimization report (XML/HTML) parser + Round-1 gate.
  • scripts/parse_mt5_report.py — backtest report parser + balance-series metrics.
  • scripts/mt5_learnings.py — cross-run learning store.
  • scripts/mt5_common.py — shared parsing helpers (EN/ES headers, numbers).
  • references/mt5-cli-reference.md — MT5 [Tester]/[TesterInputs] keys, enums, report formats and caveats.
  • assets/pipeline_config.template.json — config template with placeholders.

Key Principles

  1. Never commit personal paths — folders/terminal come from config/ENV/args.
  2. Relative Report= names because build 6061 ignores absolute report paths; collect completed reports from the terminal data directory.
  3. Real ticks (Model=4) need broker tick data; it is slow — expect long runs.
  4. Resumable: every round checkpoints; --resume reuses only fingerprint- matching work and retries execution errors.
  5. Fail closed: incomplete, timed-out, stale, or unparsable reports never reject, promote, or move a candidate. Every unique Round-1 symbol must finish.
  6. Single MT5 owner: an OS lock is held for the process lifetime for each shared MT5 data folder. If child termination cannot be confirmed, the whole run stops and writes a .blocked marker; verify the recorded PID/process tree has exited before removing that marker manually.
  7. Full-period metrics: months without deals at the start, end, or across a full year remain part of the configured test period.
  8. Learn each loop: parameter/symbol statistics bias future runs toward wins.
  9. Verify against your build: report layout (esp. the deals table) and the 32 ms delay mapping can differ — see the reference's (verify) notes.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Mt5 Robot Tester AI skill do?

Select the best MetaTrader 5 trading robots (Expert Advisors) that have not been backtested yet, by running the MT5 Strategy Tester from the command line through a 3-round pipeline. Use when the user wants to batch-test MT5 bots/EAs, screen robots across all symbols, optimize EA parameters, or move candidate bots to finalists based on profit, drawdown, positive months/years and equity-curve criteria. Runs terminal64.exe headless; Windows + MetaTrader 5 required at run time.

Why use Mt5 Robot Tester on TypingMind?

Because you install it once and use it with any model. Mt5 Robot Tester is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Mt5 Robot Tester in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/tradermonty/claude-trading-skills/tree/main/skills/mt5-robot-tester. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Mt5 Robot Tester?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Mt5 Robot Tester?

As many as you like. As long as a model supports skills, you can use Mt5 Robot Tester with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Mt5 Robot Tester AI skill free?

Yes. It is published on GitHub by tradermonty under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇