Basic Martingale EA 3
A basic martingale Expert Advisor that doubles the lot size after each losing trade, aiming to recover previous losses with a single winning trade. It enters positions based on simple signal logic and relies on the martingale progression to eventually achieve net profit. The strategy carries extreme risk of account blow-up during prolonged losing streaks.
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.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.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: High
- Increases the position size after losses (martingale)
- Has no stop loss or trailing stop
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 concept, where the core idea is to double the lot size after each losing trade so that a single winning trade can cover all previous losses and generate profit. Entry conditions are typically based on simple technical indicator signals or fixed condition triggers without sophisticated filtering mechanisms. Exit conditions primarily rely on a take-profit target, closing positions when cumulative profit reaches a set level. Position sizing follows a geometric progression, with lots increasing by powers of two (0.01, 0.02, 0.04, 0.08...), causing risk to escalate exponentially. Money management is essentially absent — the EA typically lacks a global stop-loss or maximum drawdown limit, leaving the account vulnerable to complete depletion during consecutive losing streaks. The overall strategy lacks adaptability to market trends and volatility; it may profit in ranging markets but will suffer catastrophic losses in trending conditions.
Strengths
- Theoretically profitable in ranging markets since a single win after doubling can cover all prior losses
- Simple and understandable code logic, suitable for beginners to learn the fundamentals of martingale strategy
- Configurable parameters allow users to customize the multiplier factor and maximum lot size limit
Weaknesses
- Exponential lot growth during consecutive losses can easily blow up the account with uncontrollable risk
- Lacks a global stop-loss and maximum drawdown protection mechanism, unable to limit extreme losses
- No market trend filter or volatility adaptation mechanism, guaranteed to suffer major losses in trending markets
- Over-relies on statistical regression assumptions which fail under real-world serial correlation and black swan events
Possible improvements
- Add a global maximum drawdown limit and account equity protection mechanism that halts trading when drawdown exceeds a threshold
- Incorporate trend filtering indicators (e.g., EMA or ADX) to pause martingale doubling during trending market conditions
- Set a maximum consecutive loss count limit that resets the lot size instead of continuing to double when the limit is reached
Risk assessment
Overall risk: Dangerous
- Martingale doubling causes exponential lot growth, making account blow-up highly probable during consecutive losses
- No stop-loss or maximum drawdown protection means total account loss is possible in extreme market conditions
- Lack of new bar check may cause multiple entries within the same bar, compounding risk exposure
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
InitialLot | 0.01 | Initial lot size, Martingale starting position |
Multiplier | 2.0 | Lot multiplier after loss |
TakeProfit | 10 | Take profit in points (profit target) |
MaxLot | 10.0 | Maximum lot size limit |
StopLoss | 0 | stop losspoints (0meansnostop loss) |
Similar Martingale EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.