Precipice MartIn
This EA implements a Martingale-based trading strategy that doubles lot size after each losing trade while maintaining the same direction. It enters positions based on a directional bias and uses the Martingale progression to recover losses through a single winning trade. The strategy carries significant risk due to exponential position sizing.
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 | -1.60% | -1.39% | 5.46% | 123 | 50.80% | -0.33 | -0.29 | 4 | −$1.03 | Reliable |
| GBPUSD | +2.32% | +2.01% | 5.24% | 123 | 51.60% | 0.42 | 0.44 | 7 | +$2.10 | Reliable |
| USDJPY | -0.49% | -0.43% | 5.36% | 125 | 51.60% | -0.07 | -0.09 | 8 | −$0.52 | Reliable |
| XAUUSD | +62.03% | +49.00% | 37.53% | 123 | 50.80% | 0.95 | 1.65 | 7 | +$52.88 | 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 44% of 16 · GBPUSD: better than 53% of 15 · USDJPY: better than 31% of 16 · XAUUSD: better than 56% of 16
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 31% | +2.02% 2026-02 | -1.96% 2026-06 |
| GBPUSD | 69% | +2.88% 2026-02 | -2.35% 2026-03 |
| USDJPY | 31% | +3.43% 2026-07 | -1.54% 2025-11 |
| XAUUSD | 54% | +75.30% 2026-02 | -18.55% 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
The strategy concept is based on the classic Martingale principle: double the bet after each loss, expecting a single win to recover all previous losses. Entry conditions typically involve a fixed directional bias or simple signal for the initial trade, followed by doubling lot size in the same direction after each stop loss. Exit conditions rely on price retracing to a level where the weighted average cost of all positions becomes profitable, closing all positions when the net floating profit turns positive across the entire basket. Position sizing uses a fixed multiplier progression (typically 2x), with the initial lot size set by user parameters and subsequent lots being a multiple of the previous. Money management lacks hard caps on maximum lot size or maximum number of layers, relying entirely on account balance to sustain increasing margin requirements, making it extremely vulnerable to margin calls during consecutive losses. The strategy may perform stably in ranging markets but faces catastrophic risk in strong trending conditions where price fails to retrace sufficiently.
Strengths
- Performs well in ranging markets with small drawdowns and high win rate
- Simple and intuitive logic that is easy to understand and configure
- A single winning trade can recover multiple consecutive losses, providing psychological recovery
Weaknesses
- Exponential lot size growth can lead to margin call during consecutive losses
- Lacks hard limits on maximum layers or maximum lot size
- Extremely dangerous in trending markets, potentially depleting entire account rapidly
Possible improvements
- Add maximum Martingale layer limit and maximum lot size cap to prevent infinite progression
- Incorporate a trend filter to pause or reverse direction during strong trends
- Add a money management module that dynamically adjusts initial lot size and maximum layers based on account equity
Risk assessment
Overall risk: Dangerous
- Martingale doubling mechanism causes exponential position growth during consecutive losses,easilyleading tomargin call
- No maximum layer limit means positions can theoretically increase infinitely until margin is exhausted
- Irreversible losses occur when price fails to retrace to breakeven in trending markets
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
InitialLot | 0.01 | Initial lot size; Martingale starting position |
LotMultiplier | 2.0 | Lot multiplier after each loss |
TakeProfitPips | 10 | Profit target in points, total position profit close distance |
MaxSlippage | 3 | Maximum allowed slippage |
MagicNumber | 12345 | EA unique identifier number |
Similar Martingale EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.