Gold Breakout ea MT5 M15
- Experts
- Versão: 1.1
- Ativações: 5
Product Description
Gold Breakout EA is a fully automated Gold (XAUUSD) trading robot for MetaTrader 5. It was engineered using StrategyQuant, a platform that combines genetic algorithms and machine-learning-driven strategy generation — a real, established form of AI in algorithmic trading. It looks for confirmed upward breakouts and manages every trade with volatility-based stop loss and trailing stop, so risk adapts automatically to how Gold is moving.
AI-Optimized, Rule-Based Execution
The strategy itself was discovered and refined with the help of AI: genetic algorithms test and evolve thousands of rule combinations against historical data before a stable set survives. Once built, though, it runs as a fixed, transparent rule set in live trading — the same entry trigger, the same stop-loss formula, the same trailing-stop formula, every time. You get the pattern-discovery power of AI during development, with the predictable, documented behavior of rule-based automation live on your account.
How It Enters the Market (Buy Signal)
The EA continuously compares a 50-period Simple Moving Average (SMA) against the upper Bollinger Band (62-period, 2 standard deviations) — a level that stretches further above the average as Gold gets more volatile. When this relationship signals fresh upward breakout conditions, the EA calculates the highest price recorded during a specific intraday session window — by default 06:00–19:30 on the broker's server clock, covering the European session through the London/New York overlap — and arms a Buy Stop pending order at that level.
A Buy Stop only fills if price actually rises to reach it, so the EA reacts to a confirmed move rather than predicting one. The pending order stays active for a limited number of candles and is refreshed automatically. Only one trade is open at a time — no duplicate or stacked positions.
(Current build is long-only: it trades upward breakouts. Short-side logic is not active in this version.)
Stop Loss — Adapts to Volatility
Stop Loss = 1.9 × ATR(35). ATR (Average True Range) measures how much Gold is typically moving over the last 35 candles, so the stop automatically widens in volatile conditions and tightens in calmer ones, instead of using an arbitrary fixed pip value.
Trailing Stop — Letting Profits Run
There is no fixed take-profit target. Instead: Trailing Stop = 1.8 × ATR(104), using a longer-term volatility measurement so the trade has room to develop while profit is still locked in as the move continues. Trades close on the trailing stop or the initial stop loss.
Position Sizing — Risk-Based Money Management
Position size is calculated automatically from a fixed dollar-risk amount per trade (default: $100). This is the only input most users will ever need to change — raise or lower this one number and every trade resizes accordingly. A maximum lot size cap (default 50 lots) is built in as a safety limit.
Built-in Optional Filters
Ready-to-use filters ship switched off by default: skip weekend gaps, close all trades at end of day, exit before the Friday close, or restrict trading to a specific time window. The EA trades exactly as tested with all filters off.
Requirements & Broker Compatibility
- Symbol: XAUUSD (Gold)
- Timeframe: M15
- Account type: Hedging (tested on the MetaTrader 5 hedging engine) — compatible with most prop firm accounts that offer hedging-enabled MT5
- Backtest period tested: 2023.01.01 – 2026.07.03
Backtest Results (XAUUSD, M15, 2023.01.01 – 2026.07.03)
| Metric | Result |
|---|---|
| Total Profit | $15,168.89 |
| Yearly Avg. Return | 50.56% |
| CAGR | 36.03% |
| Number of Trades | 1,089 |
| Sharpe Ratio | 1.57 |
| Profit Factor | 1.39 |
| Return / Drawdown Ratio | 9.55 |
| Win Rate | 40.17% |
| Max Drawdown | $1,587.83 (10.69%) |
Note: a win rate under 50% is normal and expected for a breakout/trailing-stop strategy like this one — it cuts small losses quickly and lets winning trades run, so fewer, larger wins offset more frequent, smaller losses. That's reflected in the Profit Factor and Return/Drawdown Ratio above, not the win rate alone.
Risk Warning
Past performance is not necessarily indicative of future results. Trading Gold and other leveraged instruments involves risk — only trade with capital you can afford to lose. Backtests cannot fully reproduce real-market conditions such as slippage, requotes, or variable spreads.
Default Configuration (Full Reference)
A. Strategy & Order Settings
| Parameter | Default | What it does |
|---|---|---|
| MagicNumber | 11111 | Unique ID so the EA only manages its own trades |
| CustomComment | Strategy_4_8_20 | Label attached to trades (rename freely) |
| Bars Valid | 199 | How many candles the pending Buy Stop stays active before refreshing |
| Replace Existing Order | ON | Updates the pending order instead of stacking a new one |
| Allow Duplicate Trades | OFF | Prevents opening more than one position at once |
| Preferred Filling Type | ORDER_FILLING_FOK | Order execution type sent to the broker |
| Force Preferred Filling Type | false | Only forces FOK if enabled; otherwise adapts to broker |
B. Core Trading Logic
| Parameter | Default | What it does |
|---|---|---|
| SMAPeriod1 | 50 | Length of the Simple Moving Average used in the entry signal |
| BollingerBandsPrd1 | 62 (2.0 deviation) | Length of the Bollinger Bands used as the breakout reference level |
| StopLossCoef1 | 1.9 | Multiplier applied to ATR(35) to set the Stop Loss distance |
| TrailingStopCoef1 | 1.8 | Multiplier applied to ATR(104) to set the Trailing Stop distance |
| Session Window (breakout high) | 06:00–19:30 (server time) | Intraday window used to calculate the breakout reference price |
C. Money Management — Only Row You Should Normally Change
| Parameter | Default | What it does |
|---|---|---|
| UseMoneyManagement | true | Turns on automatic, risk-based lot sizing |
| mmRiskedMoney | $100 | ✅ Adjust this to the dollar amount you want to risk per trade |
| mmDecimals | 2 | Decimal precision used for lot size calculation |
| mmLotsIfNoMM | 0.1 | Fallback fixed lot size if money management is turned off |
| mmMaxLots | 50.0 | Safety cap — maximum lot size the EA will ever use |
| mmMultiplier | 1.0 | Lot multiplier after losses (1.0 = no martingale/scaling) |
| mmStep | 1.0 | Step increment tied to the multiplier above |
D. Optional Time Filters (all OFF by default)
| Parameter | Default | What it does |
|---|---|---|
| DontTradeOnWeekends | false | Skip trading around the weekend gap |
| FridayCloseTime / SundayOpenTime | 23:00 / 23:00 | Window used only if the filter above is enabled |
| ExitAtEndOfDay | false | Force-close trades at a set time each day |
| EODExitTime | 23:55 | Time used only if the filter above is enabled |
| ExitOnFriday | false | Force-close trades before the weekend |
| FridayExitTime | 23:00 | Time used only if the filter above is enabled |
| LimitTimeRange | false | Restrict new signals to a specific time window |
| SignalTimeRangeFrom / To | 01:30 / 23:30 | Window used only if the filter above is enabled |
| ExitAtEndOfRange | false | Auto-exit when the time window above closes |
What Is a Gold Expert Advisor (EA) and How Does It Work?
An Expert Advisor (EA) is an automated trading program that runs inside MetaTrader 4 or MetaTrader 5. Once attached to a chart, it watches the market and opens, manages, and closes trades on its own, following a fixed set of rules — no manual clicking required. A "Gold EA" simply applies this automation to XAUUSD, the ticker most brokers use for spot Gold, which is popular for algorithmic trading thanks to its strong trends, high liquidity, and near 24-hour availability.
Not every EA is built the same way. Many are hand-coded from a trader's personal hunches and never properly tested outside a small sample of trades. This EA takes a different route: it was engineered using AI-driven strategy discovery — StrategyQuant's genetic algorithms, a real and well-documented form of artificial intelligence that generates thousands of candidate rule combinations, tests each one against years of historical Gold price data, and evolves the best-performing ones over many generations until a stable, logical rule set survives.
The result is not a "black box" that keeps changing its mind. Once the strategy is built, it becomes a fixed, transparent set of rules: a specific entry trigger, a specific stop-loss formula, and a specific trailing-stop formula. That's what actually runs on your account — predictable, documented, and the same every time, with the pattern-discovery benefit of AI baked in during development rather than guessed at during live trading.
In practice, this EA watches Gold for a breakout above a key intraday level, confirms the move with a moving average and volatility-band comparison, then manages the trade with a stop loss and trailing stop that both scale automatically with current volatility. The only setting most users ever need to adjust is how much they want to risk per trade.
Best Gold Trading Strategy for XAUUSD: Breakout vs. Other Approaches
Ask ten traders for the "best" gold strategy and you'll get ten different answers, because gold behaves differently depending on the approach used. Broadly, XAUUSD strategies fall into four camps:
- Scalping — dozens of very short trades chasing small price moves, usually on M1–M5 charts.
- Intraday/day trading — a handful of trades per day based on session opens and news reactions.
- Swing/trend following — holding trades for days, riding larger directional moves.
- Breakout trading — entering only once price confirms a move beyond a key reference level, then letting the trade run.
Gold is particularly well suited to breakout strategies. It tends to consolidate in tight ranges for hours, then move sharply once a session's key level gives way, often around the London and New York session overlap. A breakout approach doesn't try to predict the move in advance; it waits for the market to prove the move is happening, then joins it.
A genuinely profitable gold trading strategy usually needs three things working together, not just one: a clear, objective breakout trigger (so entries aren't discretionary or emotional), volatility-adjusted risk management (a fixed stop-loss size makes little sense across gold's calmer and wilder periods), and consistent position sizing (risking the same dollar amount every trade, rather than "feel"-based lot sizes). That combination — breakout entry, ATR-scaled stop loss, ATR-scaled trailing stop, and fixed-risk position sizing — is exactly what removes the guesswork from trading gold, and why it's a natural fit for full automation.
XAUUSD Trading Strategy: Why SMA and Bollinger Bands Matter
Two of the most established tools in a Gold trader's toolkit are the Simple Moving Average (SMA) and Bollinger Bands, and combining them is a well-known way to separate real breakouts from noise.
An SMA averages closing price over a set number of candles, smoothing out short-term wobble to show the underlying trend direction. Bollinger Bands work differently: they plot a band a set number of standard deviations above and below a moving average, so the band automatically widens when the market gets more volatile and narrows when it's calm. The upper band marks a level that's statistically "stretched" relative to recent price behavior — a dynamic, volatility-aware breakout reference, rather than a fixed distance.
This EA uses a 50-period SMA alongside the upper Bollinger Band (62-period, 2 standard deviations) on the M15 chart. When the relationship between the two signals a genuine shift in short-term momentum, the EA arms a Buy Stop order at a breakout level calculated from the highest price recorded during a specific intraday session window — by default, 06:00–19:30 on the broker's server clock, which typically covers the European trading session through the London/New York overlap, historically Gold's most active window.
How to Choose the Best Expert Advisor for MT4/MT5
The MQL5 Market lists thousands of Expert Advisors, and "best" depends entirely on what you can actually verify before you buy. A few questions separate a solid EA from a risky one:
Is the logic explained, or is it a black box? If a seller can't or won't tell you what triggers an entry or how the stop loss is calculated, you're trusting them blindly. A transparent EA tells you exactly what it's watching for.
Is risk adjustable with one clear setting? The best EAs let you control exposure with a single "risk per trade" input, rather than forcing you to understand a dozen interacting parameters just to trade more conservatively.
Does it disclose account requirements? Hedging vs. netting account types, minimum broker specifications, and tested symbol/timeframe all affect whether an EA will actually behave as advertised on your account.
How was the strategy actually built? Rules discovered and stress-tested through a systematic, AI-assisted process — such as genetic algorithm optimization across years of data — carry more weight than a strategy someone simply "felt" should work.
This EA is built around a single adjustable risk input (dollar amount risked per trade), publishes its full default configuration and real backtest results, and discloses both its account requirements (hedging-type MT5) and its underlying logic (SMA/Bollinger Band breakout with ATR-based risk management) — the exact transparency checklist above.
Automated Trading Robots: What to Check Before You Download One
A search for a free automated trading robot turns up thousands of results, and unfortunately most fall into one of three categories: outdated strategies no longer suited to current market conditions, unverified code with no disclosed logic, or files bundled with something you didn't ask for.
Before running any downloaded EA on a real account, a few checks matter more than the price tag:
- Source and reputation — download only from a marketplace or developer with a track record, never from random forum links or file-sharing sites.
- Disclosed strategy logic — you should be able to read, in plain language, what triggers a trade and how risk is managed.
- Realistic claims — "guaranteed profits" or "no losing trades" are red flags; every legitimate strategy has periods of drawdown.
- Adjustable risk — a robot that only lets you control lot size, rather than risk relative to your account, makes it harder to size positions sensibly as your balance changes.
- Compatibility details — required timeframe, symbol, and account type (hedging vs. netting) should be stated up front, not discovered after a bad first week live.
A paid, marketplace-listed EA with published default settings, a documented strategy (breakout entry, ATR-based stop loss and trailing stop, fixed-risk position sizing), disclosed backtest results, and clear compatibility requirements gives you everything a "free download" search usually can't verify in advance.
Trading Gold with a Prop Firm Account: What You Need to Know
Proprietary trading ("prop") firms — such as FundedNext, FTMO, and similar providers — let traders manage funded accounts after passing an evaluation, in exchange for a share of the profits. Many of these accounts run on MetaTrader 5 with hedging enabled, which opens the door to running automated EAs, including gold-focused ones, as part of an evaluation or funded challenge.
Hedging vs. netting. Confirm your prop firm's MT5 accounts are hedging-enabled — this EA, like many breakout systems, is built and tested on a hedging account type.
Drawdown and daily loss rules. Prop firms enforce strict maximum drawdown and daily loss limits. Because this EA sizes positions from a fixed dollar-risk-per-trade input, it's straightforward to set that number conservatively enough to respect a firm's specific rules — the "one setting to change" most funded traders will want to revisit first.
Server time zone. Prop firm servers commonly run on UTC+2 or UTC+3, matching gold EAs (including this one) that key off session-based price levels. It's still worth confirming in your terminal before going live, since a mismatch would shift the intraday window the strategy is designed around.
Used with those three checks done, a rules-based gold breakout EA can be a practical way to trade a funded account without needing to sit through every session manually, while keeping risk within whatever limits the evaluation demands.
Gold Trading Signals Explained: Entry, Stop Loss & Trailing Stop
"Trading signals" simply means the specific, rule-based conditions that tell a strategy when to act, as opposed to discretionary trading, where a person decides in the moment based on feel or experience. A good signal-based system removes that subjectivity entirely: the same conditions always produce the same action.
1. Entry trigger. A 50-period SMA is continuously compared against the upper Bollinger Band (62-period, 2 standard deviations). When that relationship flips in a way that signals fresh upward momentum, the EA arms a pending Buy Stop order at the high recorded during a set intraday session window. Because it's a Buy Stop and not a market order, the trade only opens if price rises to confirm the breakout.
2. Stop loss. Once filled, every trade carries a stop loss equal to 1.9 × ATR(35), a distance that automatically widens in volatile conditions and tightens in calmer ones.
3. Trailing stop. Rather than a fixed take-profit target, the trade is protected by a trailing stop equal to 1.8 × ATR(104), calculated from a longer volatility window so it doesn't cut a trending move short. As price advances, the stop follows, locking in profit while leaving room for the trend to continue.
Together, these three signals define the entire trade lifecycle, from the exact moment an order can open, to how it's protected, to how it's finally closed. Backtested over 2023–2026, this exact combination produced 1,089 trades with a 1.39 profit factor and a 10.69% max drawdown — see the full stats above.
Forex Gold Trading: Strategy Basics for Beginners
Gold, traded as XAUUSD on most MT4/MT5 platforms, is quoted and traded much like a currency pair, in US dollars per troy ounce, with familiar forex concepts: pips, lot sizes, leverage, and margin. For beginners, that familiar structure is part of why gold is often a first step outside currency pairs.
- Volatility. Gold typically moves more per pip than most major forex pairs, so position sizing matters even more — risking a fixed dollar amount per trade, rather than a fixed lot size, helps keep that consistent.
- Trading hours. XAUUSD trades nearly 24 hours a day during the week, but activity is far from constant — the European session through the New York overlap is historically the busiest window.
- Why gold moves. Interest rate expectations, US dollar strength, and broader risk sentiment (gold's traditional "safe haven" role) all drive price, often producing the kind of decisive breakouts that breakout-style strategies are built to catch.
- Manual vs. automated. Reacting correctly to gold's fast moves in real time is difficult for a beginner trading manually; a rules-based EA applies the same entry, stop-loss, and trailing-stop logic every time, without hesitation or emotion.
For someone starting out, the easiest on-ramp is usually a strategy with one adjustable dial — how much to risk per trade — rather than a system requiring a deep technical background just to turn on safely.
