RSI&Martingale1.5
This EA uses RSI indicator signals for trade entry and applies a Martingale position-sizing strategy, doubling the lot size after each losing trade to recover losses. It opens buy positions when RSI is oversold and sell positions when RSI is overbought, then escalates lot sizes on consecutive losses. The strategy aims to recoup accumulated losses with a single winning trade but carries exponential risk exposure.
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 | -7.71% | -6.73% | 8.85% | 86 | 45.30% | -1.98 | -0.87 | 6 | −$8.96 | Reliable |
| GBPUSD | -3.42% | -2.98% | 5.16% | 86 | 51.80% | -0.69 | -0.66 | 4 | −$3.74 | Reliable |
| USDJPY | +2.22% | +1.93% | 3.45% | 77 | 50.00% | 0.53 | 0.64 | 8 | +$2.72 | Reliable |
| XAUUSD | +189.20% | +140.47% | 55.90% | 91 | 56.00% | 1.37 | 3.38 | 6 | +$207.91 | Reliable |
Profitable on 2 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 0% of 16 · GBPUSD: better than 7% of 15 · USDJPY: better than 62% of 16 · XAUUSD: better than 100% of 16
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 23% | +0.84% 2026-10 | -2.48% 2026-01 |
| GBPUSD | 38% | +1.70% 2026-02 | -2.18% 2026-01 |
| USDJPY | 69% | +2.37% 2026-05 | -1.58% 2026-02 |
| XAUUSD | 77% | +139.12% 2026-02 | -8.95% 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 core strategy combines RSI overbought/oversold signals for counter-trend entries with a Martingale position-sizing system. Entry conditions trigger buy orders when RSI drops below the oversold threshold and sell orders when RSI rises above the overbought threshold. Exit conditions rely on a take-profit target, closing positions when cumulative profit reaches a configured level. Position sizing follows the classic Martingale approach, multiplying the lot size by a factor (typically 2x) after each losing trade, expecting a single win to recover all accumulated losses. Money management lacks strict account-level risk limits, relying solely on the Martingale mathematical expectation to recoup losses, which causes lot sizes to grow exponentially during consecutive losing streaks. Overall, the strategy may appear stable in the short term but carries extreme risk of account blowout over the long term.
Strengths
- RSI is a well-established and widely used technical indicator with statistical basis for overbought/oversold levels
- Martingale strategy can quickly recover small losses in the short term with strong recovery ability after drawdowns
- Parameterized design allows users to adjust RSI period and Martingale multiplier for flexibility
- Relatively simple code structure makes it easy to understand and modify for further development
Weaknesses
- Martingale lot sizing grows exponentially during consecutive losses, creating extreme account blowout risk
- Lack of stop-loss mechanism means unlimited per-trade loss exposure, relying on account balance as implicit stop
- RSI generates persistent false signals in strong trending markets, leading to consecutive losing positions
- Trading costs (spread, commission, swap) are not factored into Martingale recovery calculations, reducing actual recovery probability
- No new bar check mechanism may cause repeated position opening on the same candle
Possible improvements
- Add strict stop-loss mechanism and maximum consecutive Martingale step limit to prevent unlimited lot size growth
- Incorporate a trend filter (e.g., moving average direction) to avoid counter-trend entries during strong trends
- Add spread filter and new bar check to improve entry quality and prevent duplicate position openings
- Consider adding account risk percentage limit to halt trading when drawdown exceeds a threshold
Risk assessment
Overall risk: Dangerous
- Martingale lot sizing grows exponentially during losing streaks, extremely likely to cause account blowout
- No stop-loss mechanism means unlimited per-trade loss exposure
- No account-level risk limits, potential total capital loss in extreme market conditions
- RSI counter-trend trading triggers consecutive false signals during trending markets, causing persistent position scaling
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
RSI_Period | 14 | RSI indicator period |
RSI_Overbought | 70 | RSI overbought threshold; sell above this value |
RSI_Oversold | 30 | RSI oversold threshold; buy below this value |
Initial_Lot | 0.01 | Initial opening lot size |
Multiplier | 2.0 | Martingale multiplier, lot size multiplied after loss |
Take_Profit | varies | Take-profit target amount |
Max_Lot | varies | Maximum lot size limit |
Magic_Number | varies | EA magic number to identify own orders |
Similar Martingale EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.