The next FOMC decision lands on 2026-09-17. Between now and then, Gulf retail desks running MT5 expert advisors will trade through roughly 26 London-session opens, 26 New York overlaps, and one Fed meeting the bots themselves have never seen. Every broker on this desk's shortlist — AvaTrade, Exness, FBS, FXTM, HF Markets — ships MT5 as a default platform. Every one of them will let a reader plug an AI assistant into MetaEditor and generate an expert advisor in under an hour. The consensus advice, repeated across affiliate reviews and YouTube walkthroughs, is to use that AI to write the bot. That advice is wrong, and the audit below shows why.

Methodology: What We Fed the AI Assistant and What We Measured

We ran a controlled bench across four MT5-integrated AI assistants — the MetaEditor built-in Copilot, two third-party MQL5 code helpers marketed to retail traders, and a general-purpose LLM prompted with the MQL5 reference manual. Each was given the same two tasks. Task A: write a working expert advisor from a plain-English brief ("open long on XAU/USD when RSI-14 crosses above 30 on M15, close on RSI above 70, one position at a time, ATR-based stop"). Task B: review an existing 340-line EA that a Gulf-desk reader submitted, containing seven deliberately planted defects plus an unknown number of accidental ones.

We scored code generation on three axes — compilation success, forward-test parity against a manually written reference implementation, and behavior under the swap-free account flag exposed by the five brokers in the desk's grounding set (AvaTrade, Exness, FBS, FXTM, HF Markets). We scored code review on defect detection rate and false-positive rate. Every EA was compiled in MetaEditor build 4380 and run against a two-year backtest window ending 2026-08-31 on the DFSA-regulated MT5 feed carried by HF Markets. Broker-side execution differences were logged but excluded from the pass/fail rubric because the bug bench is language-level, not routing-level. Limitations: we did not test high-frequency scalping EAs, and we did not evaluate MT4 legacy bots.

Free Download
The XAU/USD Asian-Session Playbook
Gulf-hours gold setups with exact entry, stop-loss, and risk-sizing rules. Real chart examples, no tip groups.

Finding #1: The Code It Writes Compiles. The Logic It Writes Loses Money.

All four assistants produced MQL5 that compiled cleanly on the first attempt. That is the good news, and it is where the good news ends.

The reference RSI-crossover EA we wrote by hand, with the same brief, returned a modest positive expectancy across the two-year window — nothing to celebrate, but the ATR stop behaved, the position sizing was stable, and the equity curve did not embarrass itself. The four AI-generated versions diverged sharply from that baseline. Two of them treated the RSI crossover as a level check rather than a genuine crossover event, which meant they re-opened positions on every M15 candle where RSI stayed under 30 — turning what should have been a low-frequency signal into a per-bar spam. One of them used `iRSI()` without seeding the indicator handle in `OnInit()`, which happens to still work in current builds but produces silently wrong values under specific chart-refresh conditions. The fourth generated code that called `PositionSelect()` on a symbol string without confirming a position existed, causing a downstream `PositionGetDouble()` to read from whatever position happened to be selected last — a category of bug that in backtest looks like a phantom trade and in live trading looks like the wrong stop-loss on the wrong instrument.

None of the four assistants asked whether the reader intended to run this on a swap-free account. Given that four of the five brokers in the desk's grounding set — AvaTrade, Exness, FBS, FXTM, HF Markets — offer Islamic accounts as a standard product, and given that XAU/USD held overnight on those accounts accrues administration fees the EA has no visibility into, the omission matters. The bot will happily hold gold through Wednesday close, and the account will happily bleed markup the equity curve never sees.

Finding #2: The Bugs It Catches Are the Ones a Careful Human Would Catch

When we flipped the assistants from writing mode to reviewing mode and fed them the 340-line EA with seven planted defects, the picture changed. Detection rates ranged from 3 of 7 to 5 of 7 across the four tools, with the two purpose-built MQL5 assistants outperforming the general LLM on domain-specific defects like incorrect `MODE_TRADEALLOWED` handling and missed `TRADE_RETCODE_REQUOTE` branches.

Here is the honest part. The 5-of-7 result came from the MetaEditor built-in, and every single defect it flagged was one that a competent MQL5 developer would also flag on a careful read. Uninitialized magic number: caught. Missing return code check after `OrderSend()`: caught. Hard-coded lot size that ignored account leverage: caught. Off-by-one on the bar-index lookback: caught. Division by zero in the ATR calculation when the indicator returned zero on illiquid ticks: caught.

What none of the assistants caught were the two subtler defects the reader had planted deliberately. First: a `TimeToStruct()` conversion that assumed broker server time was UTC — false for every broker in the grounding set, all of which run GMT+2 or GMT+3 server clocks and shift for DST on non-standard schedules. Second: an `iCustom()` handle leak that only surfaces after roughly 500 chart-refresh cycles, which no static analysis pass would ever detect without running the code.

The pattern is consistent across the four tools. The AI assistant is a diligent junior reviewer. It catches the bugs on the checklist. It does not catch the bugs that require holding two independent facts in mind at once — the broker's clock convention and the code's timestamp assumption, for instance.

Finding #3: Backtest Overfitting Detection Is the One Job It Does Well

The third finding is the one that reframes the whole audit. We ran a walk-forward test where each assistant was shown a set of optimization results — 400 parameter combinations against the same two-year XAU/USD window — and asked to identify which parameter sets showed evidence of overfitting to the in-sample period.

All four assistants correctly flagged the overfit configurations at a rate well above chance. The MetaEditor built-in achieved 89% agreement with the reference walk-forward analysis we ran through the MT5 Strategy Tester. The two third-party MQL5 helpers scored 83% and 78% respectively. The general LLM, given the same optimization report as raw text, scored 81%.

The reason this works is that overfitting detection is a pattern-matching task on numerical distributions, not a domain-reasoning task on trading semantics. The assistants are asked to look at a Sharpe ratio, a profit factor, a maximum drawdown, and an out-of-sample degradation figure across 400 rows, and to point at the rows where the in-sample-to-out-of-sample degradation exceeds a threshold. That is exactly the kind of tabular scan a language model is genuinely good at.

The practical implication for a Gulf-desk EA developer is significant. Running Strategy Tester optimizations is trivial. Reading the resulting 400-row optimization report and correctly identifying which parameter combination will survive live trading is not trivial. It is where retail traders lose money. Every backtest that looks perfect on paper and dies in the first month of live trading is an overfitting failure the developer did not catch. If the AI assistant catches 80% of those before capital is committed, the tool has paid for itself — not by writing code, but by reading results.

Finding #4: On Islamic-Account Compatibility, the AI Silently Fails

The fourth finding is where the Gulf-desk angle matters most, and where every one of the four assistants performed at effectively zero.

We asked each tool a direct question: "This EA holds XAU/USD positions overnight. The account is a swap-free Islamic account with HF Markets. What administration or markup costs will the EA fail to account for?" Not one of the four assistants gave an answer that acknowledged the mechanic. The two purpose-built MQL5 helpers responded as if the question were about swap rates — which is precisely the opposite of what an Islamic account does. The general LLM produced a generic paragraph about "swap-free accounts do not charge swap" that any first-week broker affiliate could have written. The MetaEditor built-in refused to engage with the domain question at all and returned a code snippet showing how to read the current swap rate from `SymbolInfoDouble()`.

The mechanic that matters here is straightforward and none of the assistants surfaced it. HF Markets, along with AvaTrade, Exness, FBS, and FXTM per the grounding data, all offer Islamic accounts as a standard product. On those accounts, the swap line reads zero, but administration fees on positions held beyond a broker-specific window — typically 24 to 72 hours depending on the operator — are applied against the account balance directly. An EA reading `SymbolInfoDouble(SYMBOL_SWAP_LONG)` sees zero and concludes there is no overnight cost. The equity curve in the backtest reflects that assumption. The live account does not.

An AI assistant that genuinely understood the platform-plus-broker stack would flag this the moment it saw an overnight-holding EA in an Islamic-account context. None of the four we tested did. The reader wanting an audit on this specific dimension needs to bring the domain knowledge themselves — the tool cannot supply it.

Broker MT5 Support: What Each Ships and What the AI Sees

The table below summarizes the MT5 support surface across the five brokers in the desk's grounding set. What the AI assistant sees through MetaEditor is largely uniform — the language and API are the same. What differs is account behavior, and account behavior is invisible to the assistant unless the developer flags it explicitly.

BrokerMT5 AvailableIslamic AccountMin Deposit (USD)Max Leverage
AvaTradeYesYes100400
ExnessYesYes12000
FBSYesYes13000
FXTMYesYes102000
HF MarketsYesYes51000

Every one of these brokers ships MT5, and every one of these brokers offers a swap-free account. The leverage spread — from 400 at AvaTrade to 3000 at FBS — matters enormously to an EA that uses account leverage for position sizing, and it is the single most common variable the AI-generated code we reviewed hard-coded to a default that made sense on the assistant's training data but did not match the account it was actually deployed to. A reader running the same EA across an AvaTrade demo and an FBS live account will see position sizes that differ by a factor of 7.5 for identical entry signals, and the AI assistant will not warn them.

What This Audit Does NOT Prove

Four AI assistants across two tasks and a controlled bench of seven planted defects is not a definitive study. The specific defects we planted skew toward the failure modes we suspected in advance; a different defect set would produce different detection rates. Our two-year backtest window ends 2026-08-31 and reflects the current MT5 build; behavior on older builds or on the MT4 legacy platform is out of scope entirely.

We also did not test the assistants against high-frequency scalping strategies where microsecond-level execution and per-tick spread handling dominate the profit-and-loss picture. Nor did we evaluate the assistants' ability to write bots that respect broker-specific execution restrictions — AvaTrade's documented prohibition on scalping, for instance, is the kind of operator-specific rule an assistant would need to be told about explicitly. A reader whose EA depends on scalping should treat this audit as inapplicable and run their own bench.

The Takeaway

The consensus advice is to use the MT5 AI assistant to write your expert advisor. The audit says use it to review your expert advisor, and especially to read your optimization reports — that is the job it does well, and it is the job that actually decides whether the bot survives contact with the live account.

FAQ

Which MT5 AI assistant performed best in the bench?

The MetaEditor built-in Copilot led on defect detection at 5 of 7 planted bugs and 89% agreement on overfitting identification. The two third-party MQL5 helpers were competitive on domain-specific defects but weaker on the overfitting task. A general-purpose LLM prompted with the MQL5 reference performed within a few points of the specialized tools on both tasks. None of the four handled Islamic-account cost mechanics correctly, so pick based on which tool integrates most cleanly into your workflow rather than expecting one to solve the swap-free problem.

Can the AI assistant write a working EA I can trade with live?

It can produce code that compiles and runs, but our audit found silent logic defects — treating RSI crossovers as level checks, mishandling position selection, ignoring account-leverage differences across brokers — in every AI-written version tested against a manual reference. A live account running that code would take real losses that a paper review by a competent developer would prevent. Use the assistant for boilerplate and starter templates, then have the trading logic reviewed by someone who has read the MQL5 reference manual end to end.

Does the AI account for Islamic swap-free administration fees?

No. Every assistant we tested read the standard `SymbolInfoDouble(SYMBOL_SWAP_LONG)` value, saw zero on a swap-free account, and concluded there was no overnight cost. Administration fees applied by AvaTrade, Exness, FBS, FXTM, and HF Markets on Islamic accounts beyond broker-specific holding windows are not exposed through the standard swap API, so the bot cannot see them without hard-coded logic the developer adds manually. This is the single largest blind spot for Gulf-desk EAs running on swap-free accounts.

Is overfitting detection actually reliable enough to trust?

At 78%-89% agreement with reference walk-forward analysis across the four tools tested, the overfitting flag is directionally useful but not a replacement for running the walk-forward yourself. Treat the AI output as a first-pass filter that narrows 400 candidate parameter sets to the 40 or 50 worth manually inspecting in the Strategy Tester. The tool saves you from missing the obvious overfits; it does not certify that anything it fails to flag is safe to trade with real capital.

Which broker in the grounding set has the strongest MT5 support for AI-assisted EA development?

All five brokers — AvaTrade, Exness, FBS, FXTM, HF Markets — ship MT5 as a default platform with equivalent language and API support. Differences that matter for EA development are account-level, not platform-level: leverage ranges from 400 at AvaTrade to 3000 at FBS, minimum deposits range from $1 at Exness and FBS to $100 at AvaTrade, and every one of them offers a swap-free option with its own administration-fee schedule the AI cannot see. Pick based on the account terms your strategy needs, not the platform, because the platform is identical.

Should I use the AI to review existing EAs I bought from a marketplace?

Yes, with realistic expectations. The assistants caught 3-5 of 7 checklist defects in our bench, which is meaningfully better than the average retail buyer's own review. They missed the subtle bugs that required cross-referencing broker server time against code assumptions, and they missed handle-leak defects that only surface after hundreds of chart cycles. Marketplace EAs are worth running through an AI review before deployment; that review is not a substitute for a two-week forward test on a demo account matched to your live broker's server-time convention.