Gold Divergence BOS Martingale
- Experts
- Versão: 4.1
GOLD DIVERGENCE BOS MARTINGALE EA v4.1
A structure-and-divergence entry system combined with a controlled linear
martingale grid, designed primarily for XAUUSD (Gold) on any timeframe.
HOW IT ENTERS
- Detects a Break of Structure (BOS): price closing beyond the recent
swing high/low over a configurable lookback.
- Confirms the break with a divergence score across 4 indicators
(MACD line, MACD histogram, RSI, Stochastic) — requires at least 3 of 4
to diverge against the swing before arming a signal.
- Fires the trade only on a MACD signal-line cross in the confirmed
direction, with a configurable signal expiry (bars) so stale setups
are discarded automatically.
MONEY MANAGEMENT
- Linear (non-exponential) lot progression: Base Lot + Lot Increment
per level, not lot-doubling — designed to slow equity swings compared
to classic martingale.
- Fixed price-distance grid for pending averaging orders, capped at a
maximum number of levels.
- Basket-level Weighted Average Price (WAP) trailing stop: activates
once floating profit reaches a threshold, then trails and locks in
gains as price continues favorably.
- Account-level drawdown cap with automatic cooldown timer after a
basket closes, before the EA searches for a new setup.
SAFETY / RISK CONTROLS
- Pre-trade margin and broker volume-limit checks before every order.
- Automatic account-drawdown circuit breaker that flattens all
positions/orders if floating loss breaches your configured limit.
- Auto-detects your broker's supported order-filling mode (FOK/IOC/Return)
— no manual configuration needed.
- A "Live Mode" switch: default (OFF) runs with the built-in safety
checks above; switching it ON removes the extra checks for full control
on your live account once you've validated the settings yourself.
ON-CHART DASHBOARD
- Real-time panel showing EA status (idle / signal armed / basket open /
cooldown / drawdown lock), account balance/equity/drawdown, current
signal direction and divergence score, basket direction, level count,
WAP, floating P&L, and trailing-stop state.
For the Set File:
Join this group to get this Set File.
https://www.mql5.com/en/messages/03fef1c6bd0ddd01
For the 0.25 Martingale Step use the Capital 100000-200000 Cents
For the 5 Martingale Step use can use 50000 Cents account.
I have Tested this File in Exness Account,
So if you have Exness can play around with this Set File & BOT.
If you like kindly buy XAU Tri Strategy BOt from last 6 months 300-400% Return with less DD start with 300000 Cents
INPUTS (fully configurable)
- MACD (fast/slow/signal), RSI period, Stochastic (%K/%D/slowing)
- BOS lookback length, signal expiry (bars)
- Base lot, lot increment, grid step (price), max grid levels, max
account drawdown %
- Trailing activation distance, trailing offset
- Cooldown (minutes) after basket close, slippage, magic number, comment
- Dashboard on/off and screen position
RECOMMENDATIONS
- Primary symbol: XAUUSD / Gold (any broker suffix, e.g. XAUUSDc).
- Recommended timeframe: M1 for the BOS/divergence logic, though it
works on any timeframe you backtest and validate.
- Test on a demo account and in the Strategy Tester first, and size the
lot inputs to your own account balance and risk tolerance before
going live.
RISK WARNING
This EA uses a grid/martingale-style averaging approach, which by design
increases exposure as price moves against an open position. Past
performance in backtests does not guarantee future results. Trade only
with capital you can afford to lose, and always test thoroughly on a
demo account before deploying live.
