EA-18800 · Martingale

Martin

This EA implements a classic Martingale strategy, doubling the lot size after each losing trade while resetting to the initial lot after a win. It opens positions based on a simple signal (typically a single indicator or price action condition) and relies on the Martingale progression to recover losses through increasingly larger positions.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryMartingale
RiskDangerous
Blow-up riskElevated
Rating★☆☆☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsMA, RSI
AuthorCopyright © 2011, Skype: mqlcmillion

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-2.46%-2.14%4.76%12249.60%-0.52-0.527−$1.75Reliable
GBPUSD+0.50%+0.44%6.10%12151.70%0.120.086+$0.62Reliable
USDJPY-0.64%-0.55%7.30%12152.90%-0.09-0.099−$0.52Reliable
XAUUSD-79.45%-72.95%93.99%11946.60%-0.60-0.846−$65.23Reliable

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 31% of 16 · GBPUSD: better than 40% of 15 · USDJPY: better than 25% of 16 · XAUUSD: better than 0% of 16

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD46%+1.71% 2026-03-1.90% 2026-06
GBPUSD54%+2.13% 2026-02-2.39% 2026-07
USDJPY46%+2.30% 2026-04-2.71% 2026-01
XAUUSD46%+62.08% 2026-11-57.43% 2026-10

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 the classic Martingale theory: doubling the bet after each loss so that a single win can recover all previous losses. Entry conditions typically rely on a single technical indicator signal (such as moving average crossover or RSI overbought/oversold) to determine trade direction. Exit conditions close the position when a take-profit target is reached, while a loss triggers a doubled lot size on the next trade. Position sizing follows a geometric progression, multiplying the lot by a coefficient (typically 2) after each loss, and resetting to the initial lot after a win. Money management lacks a hard stop-loss, meaning account risk grows exponentially with consecutive losses, potentially leading to a margin call under extreme market conditions. The strategy may appear effective in ranging markets short-term but carries enormous risk during sustained trending moves.

Strengths

  • Simple and easy-to-understand logic, accessible even for beginners
  • May perform well short-term in ranging/sideways markets, generating consistent small profits
  • Automatically resets lot size after a win, locking in profits and avoiding over-leveraging

Weaknesses

  • Lot size grows exponentially during consecutive losses,easily leading to margin call
  • Lacks effective stop-loss mechanism, losses are uncapped in trending markets
  • Poorly suited for trending markets, adding to losing positions amplifies losses
  • Does not account for the erosion effect of spreads and commissions on the Martingale sequence

Possible improvements

  • Add a maximum consecutive loss count limit and a hard cap on maximum lot size to prevent unlimited position scaling
  • Introduce a hard stop-loss and account risk percentage control to protect capital
  • Incorporate a trend filter indicator to avoid adding positions against strong trending markets

Risk assessment

Overall risk: Dangerous

  • Martingale lot doubling causes exponential position growth during losing streaks, potentially wiping out the account
  • No hard stop-loss protection means uncapped losses in extreme market conditions
  • No hard cap on maximum position size leaves risk exposure uncontrolled

Evaluation scores

Code quality2.0
Strategy logic1.0
Risk management1.0
Robustness1.0
Innovation1.0
Documentation1.0
Overall1.2

Parameters

ParameterDefaultDescription
Lots0.01Initial lot size
LotMultiplier2.0Hedge position lot multiplier
TakeProfit500Auto take profit in points; 0=disabled
StopLoss0Auto stop loss in points; 0=disabled
MaxLots0Maximum lot size limit (0=unlimited)
MagicNumber12345Unique EA order identifier preventing conflicts
SignalPeriod14TRIX signal line moving average period

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.