EA-21331 · Martingale

MartingailExpert

This EA implements a classic Martingale strategy where it doubles the lot size after each losing trade, aiming to recover losses with a single winning trade. It enters positions based on a simple signal (typically a single indicator or price action condition) and relies on the Martingale progression rather than technical edge for profitability. The strategy is inherently risky as it assumes unlimited capital and no consecutive loss limits.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryMartingale
RiskDangerous
Blow-up riskElevated
Rating★☆☆☆☆
TypeTrading EA
TimeframesM5, M15, M30, H1
IndicatorsMoving Average
AuthorCopyright © 2018, Vladimir Karputov

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.00%0.00%0.00%0—————Not convertible yet

Why this EA never traded: no entry rule survived the conversion.

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.

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

This EA implements the core concept of the Martingale strategy, doubling the lot size after each losing trade in the expectation that a single win will recover all accumulated losses. Entry conditions are typically based on a simple technical indicator signal or alternating direction without sophisticated filtering mechanisms. Exit conditions depend on the cumulative profit target of the entire Martingale sequence, closing all positions when total floating profit reaches a preset threshold. Position sizing is the heart of the strategy — the first trade in each cycle uses an initial lot size, and after each loss the lot is multiplied (e.g., 0.01→0.02→0.04→0.08) until a win resets it back to the initial size. Money management lacks a maximum consecutive loss limit or dynamic account balance ratio adjustment, relying solely on the doubling logic. While theoretically profitable, this strategy faces extreme risk of account blowup in practice, as consecutive losses cause exponential lot growth that quickly exceeds account capacity.

Strengths

  • Simple and intuitive logic, easy to understand and modify the code
  • Can achieve steady small profits in ranging markets when combined with floating profit closing
  • Initial lot size can be set very small, keeping short-term drawdown manageable
  • Flexible parameters — multiplier and initial lots are adjustable based on account size
  • Theoretically guarantees loss recovery assuming unlimited capital

Weaknesses

  • Lot sizes grow exponentially, making account blowup highly likely after consecutive losses
  • No maximum consecutive loss limit, meaning risk is uncontrollable
  • No stop loss or overly wide stop loss, single trade loss can be enormous
  • Relies on account capital rather than strategy edge for profitability — essentially gambling not trading
  • Trading against the trend with increasing lots in trending markets leads to catastrophic losses
  • Does not account for cumulative impact of spreads and commissions on the Martingale sequence

Possible improvements

  • Add a maximum consecutive loss limit that forces closure and sequence reset when reached
  • Incorporate trend filtering indicators (e.g., MA direction) to avoid counter-trend position scaling in strong trends
  • Implement dynamic position sizing based on account balance ratio, adjusting initial lots and multiplier based on equity
  • Set an overall stop-loss line that closes all positions when floating loss exceeds a certain percentage of account balance
  • Add spread filter and trading session filter to reduce entries under unfavorable conditions

Risk assessment

Overall risk: Dangerous

  • Martingale doubling logic causes exponential lot growth, making account blowup highly likely during losing streaks
  • No stop loss protection means a single trade loss can deplete the account
  • No maximum order limit allows unlimited position scaling
  • Counter-trend position scaling creates catastrophic floating losses in trending markets
  • Ignoring cumulative spread and commission costs means actual recovery probability is lower than theoretical value

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, starting volume of martingale sequence
Multiplier2.0Lot multiplier after loss, classic martingale is 2x
TakeProfit500Group take profit target amount (in currency)
StopLoss0Stop loss in points, 0 means no stop loss
MaxOrders0Maximum order limit, 0 means unlimited
Slippage3Maximum allowed slippage
MagicNumber12345EA magic number identifier

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.