smizxe

Mt5 Agent Toolkit — AI skill for Claude Code

AI community

Turn a written trading strategy into a MetaTrader 5 Expert Advisor with an AI coding agent.

How to install Mt5 Agent Toolkit

This entry records only its repository, not the path inside it, so there is no exact command to give. Open smizxe/mt5-agent-toolkit and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Mt5 Agent Toolkit does

Turn a written trading strategy into a MetaTrader 5 Expert Advisor with an AI coding agent. Headless MQL5 compile, headless Strategy Tester, and the nine silent failures of the MT5 command line.

Alternatives in AI

README

MT5 Agent Toolkit

**Turn a written trading strategy into a MetaTrader 5 Expert Advisor, using an AI coding agent.**

Headless MQL5 compile, headless Strategy Tester, and a knowledge base that stops the agent writing MQL4 by mistake.

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![Platform](https://img.shields.io/badge/platform-Windows-0078D6.svg)](#requirements) [![MetaTrader 5](https://img.shields.io/badge/MetaTrader%205-build%205836%20%7C%206140-orange.svg)](#requirements) [![PowerShell](https://img.shields.io/badge/PowerShell-5.1%2B-5391FE.svg)](#requirements) [![Agents](https://img.shields.io/badge/agents-Claude%20Code%20%7C%20Codex-8A2BE2.svg)](#which-ai-agents-work-with-this)


You describe a strategy in plain language. The agent writes the MQL5, compiles it, reads its own compiler errors, fixes them, runs a backtest, and reports the numbers. You read the numbers and decide.

You do not need to know MQL5.

.\scripts\compile.ps1  -File "src\Experts\MyEA.mq5" -Json
.\scripts\backtest.ps1 -Expert "MyEA.ex5" -Symbol EURUSD -From 2024.01.01 -To 2024.12.31 -Json

Both return JSON. That is the whole interface an agent needs.

Contents

Why this exists

Two problems. The second is the expensive one.

**MQL5 is a niche language and language models write MQL4 by mistake.** They reach for `OrderSend` with eight parameters, `OrderSelect`, `OrderClose`, `OP_BUY`, bare `Ask` and `Bid`, `#property strict`. None of it compiles against MetaTrader 5. Without grounding, you watch an agent rediscover the same errors for an hour and conclu