DoubleUp2
This EA uses CCI and MACD indicators to generate buy/sell signals when both exceed a threshold level (±230). It employs a Martingale position sizing scheme that doubles the lot size after each losing trade, and closes profitable positions after a minimum price distance is achieved.
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
The strategy concept is based on combined signals from CCI and MACD momentum indicators, triggering trades when both exceed the 230 threshold. Entry conditions are: sell when CCI>230 and MACD>230, buy when CCI<-230 and MACD<-230, which is essentially a counter-trend approach trading against extreme momentum readings. Exit conditions are twofold: first, opposing positions are closed when a reverse signal occurs (via closeAll function), and second, profitable positions are closed when price deviation from entry exceeds 120 points (via close function). Position sizing employs a classic Martingale scheme using the m_pos counter to track consecutive losses, with new position lots calculated as base lot multiplied by 2 raised to the power of m_pos, effectively doubling the lot size after each loss. Money management dynamically calculates the base lot from account balance (balance/50001) with a minimum of 0.1 lots, but critically lacks stop-loss settings as all trades use 0 for both SL and TP, meaning losses can only be addressed through reverse signals or the Martingale mechanism.
Strengths
- Dual indicator confirmation reduces false signals by requiring both CCI and MACD to exceed thresholds simultaneously
- Dynamic lot sizing linked to account balance shows some money management awareness
- Closes opposing positions before opening new ones, avoiding hedge margin usage
Weaknesses
- Martingale lot doubling causes exponential position growth during consecutive losses, risking account blowup in extreme markets
- All trades have no stop-loss (SL=0, TP=0), leaving risk completely exposed
- The close() function uses OrdersTotal() for iteration but m_position.SelectByIndex() for selection, which is a serious logic error since OrdersTotal returns pending orders count not positions count
- The m_pos counter logic in close() is confused — incrementing by 2 on profit instead of resetting, contradicting Martingale theory
- No new bar check means the EA attempts to trade on every tick, potentially causing duplicate entries
Possible improvements
- Add stop-loss protection using ATR-based or fixed pip stops to prevent unlimited single-trade losses
- Fix the critical bug in close() where OrdersTotal() should be PositionsTotal() to correctly iterate positions instead of pending orders
- Add maximum Martingale level limits and new bar checks to prevent unlimited lot growth and duplicate entries per tick
Risk assessment
Overall risk: Dangerous
- Martingale doubling has no level cap, consecutive losses cause exponential lot growth risking account liquidation
- No stop-loss on any position means unlimited single-trade loss in extreme market conditions
- Critical bug in close() using OrdersTotal() instead of PositionsTotal() causes the close-profit function to fail entirely
- No new bar check allows potential duplicate trade entries on every tick
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Inp_ma_period_CCI | 8 | CCI indicator averaging period |
Inp_fast_ema_period_MACD | 13 | MACD fast EMA period |
Inp_slow_ema_period_MACD | 33 | MACD slow EMA period |
Similar Martingale EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.