EA-50198 · Martingale

MovingAverageMartinGale

This EA trades based on a simple moving average crossover with price, opening buy or sell positions when the MA crosses above or below the candle close. It employs a Martingale position sizing strategy, doubling the lot size after each losing trade while also multiplying TP and SL distances, and resetting to initial values after a winning trade.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryMartingale
RiskDangerous
Blow-up riskElevated
Rating★☆☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsSMA
AuthorMueller Peter

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-1.62%-1.41%5.36%9450.50%-0.35-0.304−$2.10Reliable
GBPUSD-2.44%-2.13%5.46%10350.50%-0.41-0.456−$2.37Reliable
USDJPY-3.21%-2.79%6.09%9747.40%-0.78-0.537−$3.31Reliable
XAUUSD+12.36%+10.11%77.63%10251.50%0.860.164+$9.80Reliable

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.

Against the other Martingale EAs with a reliable result on the same market: EURUSD: better than 38% of 16 · GBPUSD: better than 20% of 15 · USDJPY: better than 19% of 16 · XAUUSD: better than 38% of 16

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD38%+1.34% 2026-10-1.65% 2026-03
GBPUSD38%+2.00% 2026-03-2.70% 2026-07
USDJPY46%+1.91% 2026-03-2.00% 2026-07
XAUUSD46%+56.46% 2026-03-33.57% 2026-01

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

Blow-up risk: Elevated

  • Increases the position size after losses (martingale)

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 based on a moving average crossover with price: it goes long when the MA crosses above the price and goes short when it crosses below, essentially a trend-following signal. Entry conditions are triggered on a new candle when the MA value at shift 1 crosses over the previous close and current close prices. Exit conditions use fixed-point take profit and stop loss, with initial TP of 100 points and SL of 300 points, resulting in a risk-reward ratio of 1:3. Position sizing follows a Martingale approach: after a loss, the lot size is multiplied by 2 (capped at 0.5 lots), and after a win, it resets to the starting lot of 0.01. Money management is flawed because both TP and SL distances are also multiplied by the same factor, meaning each successive losing trade exponentially increases the total risk exposure, creating a dangerous path toward account blow-up.

Strengths

  • Martingale lot sizing has a MaxLot cap to prevent unlimited position increase
  • Automatically resets lot size and TP/SL after a profitable trade, locking in gains
  • Trades only on new candle formation, avoiding repeated entries within the same bar
  • Uses CheckVolumeValue to validate lot size before placing orders

Weaknesses

  • Martingale strategy is inherently dangerous; exponential risk growth after consecutive losses can easily blow the account
  • TP and SL distances scale with the Martingale multiplier, making individual losses enormous in later stages
  • No maximum consecutive loss limit and no account equity drawdown protection
  • Stop loss is 3x the take profit, so even without position scaling each trade has negative expected value
  • MA crossover signals are heavily lagging, prone to frequent false breakouts in ranging markets leading to consecutive losses

Possible improvements

  • Add a maximum Martingale step limit and account drawdown protection to stop scaling or close positions when thresholds are breached
  • Decouple TP/SL distance scaling from lot multiplier — only increase lot size without widening stop loss to cap per-trade risk
  • Add a trend filter and ranging market detection to avoid frequent entries during sideways conditions

Risk assessment

Overall risk: Dangerous

  • Martingale strategy causes exponential risk growth after consecutive losses; later-stage single-trade losses can far exceed account capacity
  • Stop loss distance scaling multiplies the actual monetary loss per trade
  • 1:3 risk-reward ratio combined with Martingale can produce catastrophic losses during trend reversals

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management1.0
Robustness2.0
Innovation1.0
Documentation2.0
Overall1.8

Parameters

ParameterDefaultDescription
MAPeriod50Moving average period
StartingLot0.01Starting lot size
MaxLot0.5Maximum allowed lot size
TPPoints100Take profit in points
SLPoints300Stop loss in points
LotMultiplier2Lot multiplier after a loss
TPMultiplier2TP/SL distance multiplier after a loss

Similar Martingale 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.