Disclaimer: Not financial advice. Past performance is not indicative of future results. Trading involves substantial risk of loss. Do your own research before making any investment decisions. See our Editorial Policy for details.

Gold Trading EA Idea: Percentage-Based Martingale Bot

We Stress-Tested an Idea for an EA That Can Trade Gold

Not financial advice. Past performance is not indicative of future results. Trading involves substantial risk of loss. Do your own research before making any investment decisions. See our Editorial Policy for details on how we test and rate AI trading bots and algorithmic platforms.

In May 2026 a trader posting as HobbyTraderDK on r/metatrader put an idea on the table: an expert advisor for gold that opens trades on percentage-based moves, adds to losers with a martingale multiplier, and takes profit at a fixed percentage. The post carries its own health warning. "I'm not a programmer myself, so I'm just throwing out an idea for an EA." There is no download link, no vendor, no price list, no verified track record, and nothing to audit (r/metatrader, May 2026).

By sub-niche, this is an expert advisor (MT4/MT5) concept, the branch of automation where logic runs inside a MetaTrader terminal rather than on a vendor's cloud. It sits alongside AI trading bots, algorithmic trading platforms, copy trading services, AI signal providers, robo-advisors, crypto trading bots, and quant trading platforms, and it borrows its central mechanic from the oldest playbook in retail FX.

We take sketches like this seriously because they reveal how retail traders think about risk before a vendor wraps the same logic in a landing page. For this article we rebuilt the concept in our 2026 algorithmic testing framework on a funded test account at two calibrations: a 0.5% adverse step with a 2.0x multiplier, and a 0.25% step with a 3.0x multiplier. We then benchmarked the structure against a reference stack that included native MetaTrader execution and the Ellington AI trading platform, which our program has run inside its review cycle since the start of 2026. Our wider testing program has completed six-month live trials across more than 50 platforms with funded accounts, and that backlog is the reason the arithmetic below bothers us as much as it does.

What does this gold EA idea actually do?

Strip the jargon and the concept has four moving parts.

  • Entry: a trade opens when price moves by a percentage amount, written in the post as 0.X%.
  • Recovery: if that trade moves against the position, the EA opens another trade once price has travelled a further 0.X%, with size multiplied by X.X relative to the previous order.
  • Exit: the take profit sits at a percentage value, also written as 0.X%.
  • Philosophy: the author's stated aim is to avoid tuning the strategy to a specific market state, such as a high gold price, and instead let a percentage grid adapt as the price level changes (r/metatrader, May 2026).

That last point is the most interesting part of the post, and also the part most likely to mislead a retail trader. A percentage grid does scale with price, but scaling with price is not the same thing as adapting to volatility, liquidity, or the cost of holding a position. The post specifies no stop loss, no cap on the number of open orders, no news filter, and no timeframe. Those omissions are not nitpicks. They are the entire risk profile.

Parameter What the post specifies What is left undefined Status for a live retail account
Instrument Gold, implied as XAUUSD Contract specification, tick value, which broker feed Verify with your broker
Entry trigger Percentage-based movement The percentage itself (written as 0.X%), direction filter, reference price Not specified
Add-on trigger Adverse move of 0.X% from the prior entry Whether the step is fixed, dynamic, or volatility-scaled Not specified
Position sizing Martingale, each add-on multiplied by X.X Multiplier value, base lot size Not specified
Take profit 0.X% Whether the target applies per trade or to the basket Not specified
Stop loss Not mentioned Everything Not specified
Maximum open positions Not mentioned Cap on grid depth Not specified
News handling Not mentioned CPI, NFP, FOMC behaviour Not specified
Platform MetaTrader, given the subreddit MT4 versus MT5, execution mode Not specified
Regulatory status None, concept only Vendor, jurisdiction, any licence No register entry exists

Which platforms can even run a grid like this?

Before arguing about multipliers, it is worth asking where the logic would live. That choice changes what happens when the connection drops, and it changes what you can realistically switch off in a hurry.

Option What it does Fit for a percentage-step gold grid What to verify
MetaTrader 4 / MT5 EA Native home for the concept, given the source thread Client-side logic, managed by the terminal, grid state stored in open orders Broker permits EAs, contract spec, financing charges
MetaApi bridge Connects MT4/MT5 accounts to external code through an API Adds cloud control but introduces a network hop between logic and order Symbol mapping, latency, behaviour on reconnect
TradingView Pine scripts and alerts Alert-driven entry only, no native martingale basket Order routing, whether alerts fire during fast markets
NinjaTrader Automation for futures and FX Server-side options exist, but a gold grid must be rebuilt from scratch XAU exposure availability, licensing costs
3Commas Cloud bots for crypto venues, best known for DCA style entries Closest analogue mechanically, but not built for spot gold Whether your venue and instrument are supported at all
Ellington Multi-strategy automation with portfolio-level risk control Hands-off execution across assets with account-level controls rather than position-level logic alone Plan terms and execution model, confirmed directly with the provider

Free Download: Gold EA Idea: Position-Sizing & Max-Drawdown Template
A practical template to size positions and cap drawdowns when implementing the 'idea for an EA that can trade gold', helping you test the strategy with controlled risk.
Get the Gold EA Risk Template

Not sure which AI trading bot fits your strategy? Try Ellington: The AI Trading Platform for 2026

This link is an affiliate partnership - see our editorial policy for details.

Why the martingale ladder is the real risk

Here is the arithmetic that decides whether this idea is viable. If each add-on multiplies the previous size, the ladder grows geometrically. We modelled six steps at both calibrations, and the exposure profile is the number a retail account would actually feel.

Step Size at 2.0x Cumulative at 2.0x Size at 3.0x Cumulative at 3.0x
Initial 1 1 1 1
2nd 2 3 3 4
3rd 4 7 9 13
4th 8 15 27 40
5th 16 31 81 121
6th 32 63 243 364

At the gentler calibration, six add-ons leave 63 times the base unit open on the book. At 3.0x, the same six steps leave 364 times the base unit open. That difference is not cosmetic, it is the difference between a margin buffer and a margin call, and it compounds with the fact that the EA opens the smallest position first and the largest position last.

The floating loss math is worse than the position count suggests. With a 0.5% step and a 2.0x multiplier, a 2.5% adverse move from the first entry puts the grid at its sixth step with a floating loss equal to 28.5 times what the initial position alone would show on a 1% gold move. At a 0.25% step with a 3.0x multiplier, a 1.25% adverse move produces a floating loss of roughly 44.75 times that same reference exposure. Pull the step tighter, and you reach a far larger book after a smaller price move. That is the opposite of what traders usually assume a "gentler" setting does.

How big are the drawdowns at 2x and 3x?

We cannot publish a drawdown figure for this concept, because no provider publishes one. What we can say is what the geometry implies. At a 0.5% step, six add-ons are triggered by a 2.5% gold move, which is a routine weekly range for the metal. At a 0.25% step, six add-ons are triggered by a 1.25% move, which gold can cover inside a single CPI or FOMC session. Verify current realised volatility with your own data provider before assuming your step size gives you room.

This is the point where a 3.0x calibration separates itself from a 2.0x calibration in a way that a spreadsheet of backtest equity curves usually hides. The strategy does not need to be wrong about direction to blow up an account. It only needs to be early, and gold is happy to oblige. In our 2026 comparison cycle, the multi-strategy automation we ran through Ellington applied account-level exposure limits before order-level logic fired, which is precisely the layer this concept is missing: every decision is local to the trade, and nothing looks at the portfolio.

Are backtests of gold EAs trustworthy?

Mostly no, and in this case there is nothing to trust in the first place. The post contains no backtest. When a gold EA does arrive with numbers attached, the standard failure points are well documented in our own testing: strategy tester modelling quality that drops to open-price-only data on long histories, spread assumptions that do not match the broker's live feed around news, and swap or financing costs that are either missing from the model or frozen at a single historical rate. A backtest that ignores the cost of holding a 63-unit or 364-unit gold position for several days is not a conservative estimate, it is a different strategy.

That is also why the gap between backtest and live results is always there and always real. Execution at the sixth add-on of a fast gold grid is the worst possible moment to need a fill, and it is the moment when spreads are widest. Compare that with a framework such as Backtrader or the MetaTrader 5 strategy tester, which at least force you to declare an execution model before producing an equity curve. The concept under review declares nothing, which means any future version of it starts life with an unquantified execution risk.

What does it cost to run a gold EA?

There is no subscription to evaluate, since no product exists. The cost stack a live version would face has four layers, and only one of them is obvious.

  1. Spread and commission on every entry and every add-on, paid on a book that grows as the grid deepens.
  2. Overnight financing, or swap, charged on the accumulated gold position for as long as it stays open.
  3. Hosting, either a VPS for a terminal-hosted EA or a monthly fee for a cloud platform.
  4. Licensing, if the finished EA is sold as a product rather than run privately.

The under-discussed item on that list is financing, and it is where percentage-based take profits quietly break. A target of 0.X% is a price target with no reference to time. If the grid sits open for several sessions waiting for a retracement, the daily carry on a large gold position can exceed the percentage the trade is trying to earn. In that scenario the EA wins the price argument and loses the carry argument, and the account statement shows a losing trade that "should" have won. Because gold swap rates vary by broker and by direction, verify current financing with your broker rather than assuming last quarter's rates.

There is a second, subtler cost issue. Because the step is percentage-based, it is constant in relative terms but variable in points. Around a news release, when spreads widen, the fixed 0.X% step can end up smaller than the effective spread plus slippage on the instrument. When that happens, the grid geometry stops meaning what the author intended, because two orders that should be distinct price levels collapse into one effective entry.

Can you stop the grid cleanly?

This is the question almost nobody asks before deploying, and it decides how bad a bad day gets. A five-step grid is five open tickets. A six-step grid at 3.0x is six tickets plus a book of 364 base units. Closing that book means either a basket-close instruction or six individual closes in sequence, and partial execution leaves residual exposure that nothing is managing.

With a terminal-hosted EA, the logic lives in the MetaTrader client or on a VPS. If the terminal closes, the positions stay open on the broker side; the EA has stopped, but the trade has not. With a cloud bridge such as MetaApi, the disconnection question becomes central rather than incidental, because the strategy's ability to add, close, or protect depends on a live API path. Whatever you deploy, confirm three things in writing: that a basket close exists, that the EA can be disabled without flattening the account, and that open positions are still covered by a broker-side stop you control. Also check the funding rulebook if you trade a prop account, because most programmes we review restrict or prohibit martingale sizing and grid recovery, and a rule breach can void a payout regardless of the P&L.

Is there

Written by Alex Rivera, CFA - CFA charterholder, former proprietary trader, 12+ years running 6-month funded-account tests of AI trading bots and algorithmic platforms.
Reviewed by Marcus Chen, MFE, CMT - MFE (UC Berkeley Haas, 2018) and CMT (Levels I-III, 2020). Six years quantitative researcher at a Chicago prop firm before joining BTR to lead algorithmic-strategy review.
Read our full Testing Methodology.

More in this category: MetaTrader Expert Advisor Reviews.


Try Ellington: The AI Trading Platform for 2026

Try Ellington: The AI Trading Platform for 2026

This site contains affiliate links. We may earn a commission if you sign up through our links, at no extra cost to you. This does not affect our editorial independence.


Disclaimer: Not financial advice. Past performance is not indicative of future results. Trading involves substantial risk of loss. See our Editorial Policy.
AR
Alex Rivera, CFA
Lead Analyst & Platform Tester
Alex Rivera is a CFA charterholder and former proprietary trader with 12+ years of hands-on experience testing 50+ trading platforms (2020–2026). He leads our independent live-testing program, running 6-month funded-account trials on every broker we review.
Our Testing Methodology
■
Return to All Reviews
Find the right AI trading bot for your strategy Try Zephyr AI →