Doubler
A Martingale-based Expert Advisor that doubles the lot size after each losing trade, aiming to recover previous losses with a single win. It enters positions based on simple directional signals and relies on the Martingale progression to eventually achieve net profit when a winning trade occurs.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | +0.16% | +0.14% | 3.06% | 109 | 50.00% | 0.06 | 0.05 | 4 | +$0.46 | Reliable |
| GBPUSD | +5.76% | +4.99% | 4.43% | 107 | 51.40% | 1.05 | 1.30 | 8 | +$5.38 | Reliable |
| USDJPY | +1.90% | +1.65% | 4.75% | 95 | 47.40% | 0.43 | 0.40 | 6 | +$2.01 | Reliable |
| XAUUSD | -1.92% | -1.59% | 50.80% | 102 | 52.50% | 0.38 | -0.04 | 7 | +$0.56 | Reliable |
Profitable on 3 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 75% of 16 · GBPUSD: better than 93% of 15 · USDJPY: better than 50% of 16 · XAUUSD: better than 19% of 16
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 46% | +2.69% 2026-04 | -1.12% 2026-01 |
| GBPUSD | 69% | +2.68% 2026-04 | -2.58% 2026-10 |
| USDJPY | 54% | +2.80% 2026-04 | -1.92% 2026-03 |
| XAUUSD | 62% | +32.61% 2026-02 | -22.28% 2026-08 |
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
This EA employs the classic Martingale strategy, whose core concept is to double the lot size after each losing trade, so that theoretically a single winning trade can recover all cumulative losses and achieve net profit. Entry conditions are typically based on simple trend or momentum signals such as moving average crossovers or RSI overbought/oversold reversals, though some implementations may use fixed direction or even random entry. Exit conditions involve closing positions upon reaching a fixed take-profit target, while stop-loss settings are optional and many Martingale EAs omit stop-loss entirely, relying on position doubling rather than stops for risk control. Position sizing follows a geometric progression pattern (1, 2, 4, 8, 16...), starting with a small initial lot but scaling exponentially with each consecutive loss. Money management lacks effective maximum drawdown protection or consecutive loss limits, making the account extremely vulnerable to margin calls during extended losing streaks, categorizing this as a high-risk strategy type.
Strengths
- Strategy logic is simple and intuitive, easy to understand and debug
- In short-term ranging markets or with limited consecutive losses, it can quickly recover losses and achieve profit
- Code structure is typically concise, suitable as a learning template for Martingale strategies
- Net profit per winning cycle equals the initial lot's profit, showing stable performance in most single cycles
Weaknesses
- Lot size grows exponentially, making margin calls highly likely after consecutive losses
- Lacks effective maximum drawdown protection and hard limits on consecutive loss count
- Risk amplifies extremely during trending markets with sustained one-direction losses
- Without stop-loss, a single losing position can far exceed expectations
- Long-term mathematical expectation is negative; Martingale strategy is fundamentally unsustainable
Possible improvements
- Add a maximum consecutive loss count limit that resets lot size instead of continuing to double
- Implement account equity drawdown percentage hard limit that auto-stops trading and closes positions beyond threshold
- Introduce a trend filter to avoid adding positions against strong trends
Risk assessment
Overall risk: Dangerous
- Martingale doubling mechanism causes exponential lot growth with extremely high margin call probability after consecutive losses
- Missing stop-loss or stop-loss set to 0 means unlimited single-trade loss exposure
- No maximum drawdown protection or consecutive loss count limits
- Insufficient margin prevents continued doubling, leaving unrealized losses unrecoverable
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
InitialLot | 0.01 | Initial lot size, opening volume of first trade |
Multiplier | 2.0 | Lot multiplier after loss |
TakeProfit | 10 | Take profit in points |
StopLoss | 0 | Stop loss in points, 0 means no stop loss |
MaxLot | 100 | Maximum lot size limit |
MagicNumber | 22820 | Unique order identifier number |
Similar Martingale EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.