Discussing the article: "Inside MetaEditor's AI Assistant: Writing, Repairing and Testing MQL5 with an Agent"

Check out the new article: Inside MetaEditor's AI Assistant: Writing, Repairing and Testing MQL5 with an Agent.

We use the MetaTrader 5 AI Assistant to execute the full workflow end to end: create an EA from a natural‑language prompt, compile it, break and watch it self‑correct from compiler output, backtest it, and compare a controlled re‑run. The article details the underlying MCP extensions, configuration and safety limits, and how to connect external AI clients. Readers get a repeatable process for building and testing EAs inside the platform.

MetaTrader 5 build 6060 changed what the platform means for developers. The terminal and MetaEditor now ship a built-in AI Assistant, and both expose themselves over the Model Context Protocol so that external AI agents can drive them as well. In a previous article, How to connect AI agents to MetaTrader 5 via MCP, we assembled something similar manually; the platform now offers it natively. The assistant is not a chat window bolted onto the editor. It is an agent with tools, and those tools reach the compiler, the Strategy Tester, your charts, your account and your source tree.

Plenty of trading software now has a chat box that can talk about markets. Far fewer can take a sentence describing a strategy, write the MQL5 for it, compile it against the real compiler, read the diagnostics, fix its own mistakes, run the result through the Strategy Tester, and then change a parameter and test again. That full loop is what we walk through here, building one deliberately ordinary Expert Advisor from nothing and using the build as a tour of the machinery around it. Everything shown was run in August 2026, and every file path and log excerpt is one you can open on your own machine.


Author: Muhammad Minhas Qamar

This concept works when I use it in antigravity, vscode. So the AI agent just takes the price data in mt5 then it's processed by the AI agent for analysis and produces output that can be used for direct automatic trading with the creation of an EA