Can ChatGPT Write a Profitable MT5 EA? I Ran It Live

Can ChatGPT Write a Profitable MT5 EA? I Ran It Live

17 July 2026, 16:00
Diego Arribas Lopez
0
30

Can ChatGPT write a profitable MT5 EA? Here is the answer nobody selling you a course will give straight: yes, it can write an EA that compiles, backtests, and trades. No, that EA will almost certainly not be profitable on its own. And yes, there is a way to make AI genuinely profitable inside an EA, but it is not the way the tutorials show you. I know because I have been running AI trading logic on live charts, in public, since December 2025.

If you have already tried it, you know the cycle. ChatGPT hands you clean MQL5 code in thirty seconds. It compiles. The backtest looks decent. You feel like you just skipped five years of learning to program. Then it meets a live market and bleeds. You were not doing it wrong. The tool was doing exactly what it does: writing correct code for a strategy that never had an edge.

The Gap Every Tutorial Admits (Then Ignores)

Read any honest article about ChatGPT and MT5, including the ones ranking above this one, and you will find the same quiet confession buried in the middle: "of course, ChatGPT writes the code, but the strategy is up to you."

That sentence is the whole story. Everyone admits it. Nobody closes it. Because closing it means telling you the uncomfortable truth: the code was never the hard part. A working MQL5 file is worth exactly as much as the strategy inside it, and the strategy ChatGPT gives you when you ask for "a profitable EA" is a generic moving-average or RSI template it has seen ten thousand times in its training data. Those templates are public precisely because they stopped working, if they ever worked at all.

So the tutorials teach you to generate losing strategies faster. That is the gap. The rest of this post is about what actually sits on the other side of it.

What ChatGPT Genuinely Gets Right

Let me be fair to the tool, because the honest case for it is strong:

  • Syntax and boilerplate. Order functions, error handling, input parameters, OnTick structure. What used to take a beginner weeks now takes minutes. This is real and valuable.
  • Translation. "Turn this Pine Script into MQL5" or "convert this MT4 EA to MT5" works surprisingly well, with supervision.
  • Explaining code. Paste any EA and ask what it does. As a due-diligence tool for code you are about to run with real money, this alone justifies the subscription.
  • Iterating. "Add a trailing stop," "only trade London hours," "log every decision to a file." Modifications that used to require a freelancer now happen in the chat.

I documented the full experiment in my hands-on test of ChatGPT writing an MT5 EA: what compiled, what broke, and what it kept getting wrong. Short version: as a coding assistant, it earns its place. As a strategy author, it fails for a reason that no amount of prompting fixes.

What ChatGPT Cannot Know (and Your Backtest Won't Tell You)

A strategy is a claim about the future behavior of a market. ChatGPT has no access to that. What it has is the accumulated average of everything ever written about trading, which means its strategies are, by construction, the consensus. The consensus has no edge. If it did, it would stop being the consensus.

Worse, the backtest will lie to you about this. A generic template tuned on recent history produces a beautiful curve, because that is what optimization does: it fits the past. Why perfect backtests lose money live is its own topic, but the one-line version applies double to AI-generated code: the more you ask ChatGPT to "improve" a strategy against historical data, the more overfit it gets, and the more confident you feel right before it fails.

And then there is everything the generated code silently skips: spread behavior at rollover, slippage on news candles, weekend gaps, requotes. The clean template assumes a market that does not exist. That gap between assumed market and real market is where most AI-written EAs actually die, and it deserves its own teardown (coming in this same series).

So I Ran It Live. Here Is What Actually Works

After enough failed "write me a profitable EA" experiments, I flipped the architecture. Instead of asking the model to author a strategy, I put the model inside a strategy: a decision layer that reads live market context before each trade and returns a judgment. Take it, skip it, size it down. The strategy logic, the risk limits, and the execution are engineered and fixed. The AI does the one thing it is actually good at: contextual reasoning, on demand, against conditions no backtest could have prepared.

That system has been forward-testing in public since December 21, 2025. As of June 24, the verified Myfxbook shows +36.59% in 185 days across 264 trades, with a profit factor of 1.24 and a 47% win rate. And the number I want you to look at hardest: a maximum drawdown of -16.25%. That drawdown is not a flaw in the marketing. It is the cost of real trading, and any AI trading claim that arrives without one is a claim you should walk away from.

Notice what those numbers are not. They are not 90% win rates. They are not a straight line. A 47% win rate is profitable because the wins are structurally larger than the losses, which is exactly the kind of unsexy math that generic ChatGPT strategies never encode. If you want to understand what the model actually contributes inside the loop, I broke the whole architecture down in what the AI in an AI EA actually does.

Watch the answer instead of reading it.

Alpha Pulse AI is that live experiment: frontier models (GPT, Claude, Gemini) passing judgment on real trades, on a public Myfxbook track, drawdowns included. It exists because "can AI trade profitably?" deserved a verifiable answer instead of another backtest screenshot.

The Workflow That Actually Works

If you want to build rather than buy, here is the honest division of labor that survived contact with live markets:

  1. You own the strategy. The edge hypothesis has to come from somewhere real: market structure, session behavior, an inefficiency you can articulate. If you cannot state why the edge exists, ChatGPT cannot save it.
  2. ChatGPT writes the plumbing. Code structure, order management, logging, safety checks. Supervised, tested on demo, never pasted blind.
  3. The model earns a place in the loop, not the author's chair. Used as a pre-trade filter or context reader, a frontier model adds judgment. Used as a strategy generator, it adds consensus. The system prompts that actually work for trading are the ones that constrain the model to a narrow, verifiable job.
  4. Forward-test in public or it does not count. Demo first, then small live, then a verified track. The backtest is the audition; the live track is the job.

Budget for reality: the connection layer between MT5 and a model API has its own failure modes (latency, rate limits, hallucinated outputs). I keep a running list in the seven problems nobody warns you about when you connect MT5 to ChatGPT, because they are still real in 2026.

Build vs Buy: The Honest Fork

Building this properly took months of engineering, API costs, and a public track record to prove it works. That was the right trade for me because it is my business. Whether it is the right trade for you depends on what you are actually after.

If the goal is to learn, build. The education is worth more than the first EA you produce. If the goal is a working AI system with a verifiable record, buying one you can audit beats assembling one you cannot. Either way, apply the same standard I am asking you to apply to me: a public forward test, a visible drawdown, and a vendor who can explain exactly what the AI decides. Anything less is a sticker.

The Honest Close

Can ChatGPT write a profitable MT5 EA? As author: no, and the people telling you otherwise are selling the thirty-second dream. As engineer's assistant and as a decision layer inside a properly built system: yes, verifiably, with the losses on public record.

The difference between those two answers is the difference between a chat window and a trading system. Now you know which question to ask.

I publish what the models get right and wrong on live charts every week, losses included, in the DoItTrading newsletter. If you are experimenting with AI and MT5, it will save you some expensive lessons.

Frequently Asked Questions

Can ChatGPT write a profitable MT5 EA by itself?

No. ChatGPT reliably writes MQL5 that compiles and runs, and it is genuinely useful for translating strategies or explaining existing EA code. But the strategy inside that code is consensus logic from its training data, with no market edge, so the unassisted output is a working robot for a losing strategy. Profitability requires a real edge hypothesis from you, plus the AI used as a component rather than the author.

Why do ChatGPT-written EAs lose money live?

Three compounding reasons: the strategies are generic templates with no edge, iterative "improvement" against historical data overfits them to the past, and the generated code silently ignores live-market frictions like spread spikes, slippage, and news gaps. Each failure is invisible in a backtest and expensive on a live chart.

Is there any profitable way to use AI in an MT5 EA?

Yes: as a decision layer inside an engineered system rather than as the strategy author. A frontier model reading live market context and passing judgment on each candidate trade adds real contextual reasoning. That architecture is forward-testable and is exactly what our public Myfxbook track has verified live since December 2025, drawdowns included.

How much does it cost to run a ChatGPT-connected EA?

Plan for model API usage (varies with call frequency and model tier), a VPS so the connection survives your laptop closing, and development time for the integration layer. The hidden cost most people skip is testing: weeks on demo before any real money. Whatever a course promises, the thirty-second free EA does not exist once you price in what it takes to run one responsibly.

Should I build my own AI EA or buy one?

Build if your goal is learning; the process teaches you more than the result. Buy if your goal is a working system, but only from a vendor you can audit: public forward test, visible maximum drawdown, and a concrete explanation of what the AI actually decides. Apply that standard to everyone, including us. A vendor who cannot show a live track is answering your question, just not with words.