EA-69712 · Grid

MASTER_WINNERFX_GOLD_MT5

This EA is a grid trading system for gold (XAUUSD) that uses EMA trend direction and RSI momentum for initial entries, then adds up to 3 martingale-scaled grid positions at fixed pip intervals when price moves against the trade. All positions are closed when combined profit reaches a target or loss exceeds a maximum risk threshold.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryGrid
RiskHigh risk
Blow-up riskHigh
Rating★★☆☆☆
TypeTrading EA
TimeframesM15
IndicatorsEMA, RSI
AuthorMuhammad Asim

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-2.96%-2.57%6.09%11241.40%-0.60-0.4910−$2.97Reliable
GBPUSD-2.03%-1.76%9.27%11245.00%-0.28-0.228−$2.09Reliable
USDJPY-6.09%-5.32%9.37%16042.80%-1.19-0.655−$3.80Reliable
XAUUSD+46.15%+36.83%64.45%10139.60%0.900.7214+$45.70Reliable

Profitable on 1 of 4 markets with reliable results.

Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD46%+1.74% 2026-03-3.58% 2026-04
GBPUSD46%+1.66% 2026-10-3.89% 2026-04
USDJPY31%+1.04% 2025-11-2.40% 2026-03
XAUUSD69%+58.33% 2026-01-23.23% 2026-07

From the backtest equity curve, sampled about every two days; only reliable results.

Blow-up risk: High

  • Opens a grid of orders at fixed price steps
  • Has no stop loss or trailing stop
  • Can hold up to 6 positions at once

High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →

Strategy analysis

The strategy concept is a trend-following grid pyramiding system that combines EMA for trend direction and RSI for momentum confirmation before initial entry. Entry conditions are: go long when price is above EMA and RSI is above 55, or go short when price is below EMA and RSI is below 45. Exit conditions are twofold: close all positions when total combined profit reaches TargetProfit, or close all when total loss exceeds MaxRisk. Position sizing uses dynamic lots calculated from account balance at LotPer1000 per $1000, and grid additions use a Multiplier factor to increase lot size progressively, making this a martingale-style pyramiding approach. Money management checks free margin via CanOpenTrade before each order and normalizes lot size via GetSafeLot, but the maximum grid level is hard-coded to 3 layers. Grid spacing is fixed at GridStep points, and no individual stop-loss or take-profit price levels are set on any order, relying entirely on combined P&L triggers for exits.

Strengths

  • Uses dual EMA and RSI filters for initial entry direction, avoiding counter-trend openings
  • Dynamic lot sizing automatically adjusts based on account balance, providing proportional risk management
  • MaxRisk parameter caps maximum allowed loss, preventing total account blowout
  • Pauses trading during news hours and market close hour, avoiding high-volatility periods
  • Uses MagicNumber to tag positions, preventing conflicts with other EAs

Weaknesses

  • Grid pyramiding uses a 1.2x martingale multiplier, causing increasingly large positions against the trend which amplifies losses exponentially
  • No individual stop-loss prices are set on any order, relying entirely on programmatic closing via OnTick which fails if the terminal disconnects
  • RSI thresholds are counterintuitive with buy threshold at 55 and sell threshold at 45, the narrow gap may cause frequent misjudgment of direction
  • Maximum grid layers are hard-coded to 3 with no parameter to adjust, limiting flexibility
  • News pause is based only on a fixed hour, unable to adapt to different economic calendars or actual news release times
  • No new bar check is implemented, every tick triggers evaluation which could lead to redundant or rapid-fire order attempts

Possible improvements

  • Add new bar detection logic to prevent repeated entries and grid additions within the same candle
  • Set stop-loss price levels on each individual order to protect against terminal disconnection scenarios where programmatic closing cannot execute
  • Make maximum grid layers a configurable parameter and add a total exposure lot size cap check
  • Add spread filtering to avoid opening positions during high-spread conditions, especially before/after news and during low-liquidity sessions

Risk assessment

Overall risk: High risk

  • Martingale-style grid pyramiding rapidly amplifies losses in adverse markets, with 3 layers at 1.2x multiplier reaching 1.728x base lot on the final layer
  • No stop-loss prices on any order means if the MT5 terminal disconnects from the server, programmatic closing logic cannot execute, leaving positions fully exposed to unlimited market risk
  • No new bar check mechanism could cause rapid-fire repeated entry triggers within extremely short timeframes
  • MaxRisk is set as a fixed dollar value rather than a percentage, causing the risk proportion to vary as the account grows or shrinks

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management2.0
Robustness2.0
Innovation1.0
Documentation1.0
Overall1.8

Parameters

ParameterDefaultDescription
LotPer10000.01Base lot size per $1000 balance
Multiplier1.2Grid lot multiplier (Martingale factor)
GridStep1500Grid spacing in points
TargetProfit3.0Portfolio profit target in USD, close all on reach
MaxRisk1000.0Max allowed loss in USD, close all on breach
MagicNumber506780EA magic number for identifying its positions
EMAPeriod50EMA period for trend direction
TrendTFPERIOD_M15Timeframe used for trend determination
RSIPeriod14RSI period
RSILower55RSI long threshold (above confirms bullish momentum)
RSIUpper45RSI short threshold (below confirms bearish momentum)
PauseDuringNewstruePause trading during news events
NewsHoursUTC13News event hour in UTC
MarketCloseHour22Market closed hour, no trading during this hour

Similar Grid EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.