EA-21511 · Martingale

CCI and Martin

This EA uses the CCI (Commodity Channel Index) indicator to generate trade signals and applies a Martingale position sizing strategy, doubling the lot size after each losing trade. It opens buy positions when CCI is oversold and sell positions when CCI is overbought, relying on eventual mean reversion to recover losses. The Martingale approach makes it inherently high-risk, as a prolonged losing streak can rapidly deplete the account.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryMartingale
RiskDangerous
Blow-up riskHigh
Rating★☆☆☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsCCI
AuthorVoloshin Yuri

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-5.41%-4.72%6.22%11045.50%-1.23-0.875−$4.92Reliable
GBPUSD-2.50%-2.17%5.25%10655.20%-0.35-0.485−$2.09Reliable
USDJPY+2.81%+2.44%4.94%10357.80%0.540.574+$2.69Reliable
XAUUSD+76.49%+59.90%55.07%12058.30%1.221.397+$63.74Reliable

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 6% of 16 · GBPUSD: better than 13% of 15 · USDJPY: better than 81% of 16 · XAUUSD: better than 62% of 16

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD31%+3.24% 2026-07-2.58% 2026-08
GBPUSD31%+2.83% 2026-02-3.06% 2026-01
USDJPY54%+1.83% 2026-08-2.13% 2026-02
XAUUSD62%+36.87% 2026-02-23.33% 2026-04

From the backtest equity curve, sampled about every two days; only reliable results.

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 combines CCI-based mean reversion signals with a Martingale money management system. Entry conditions trigger a buy when the CCI indicator enters oversold territory (typically below -100) and a sell when CCI enters overbought territory (typically above +100). Exit conditions rely on a take-profit target, closing positions when a preset profit level is reached. Position sizing follows the classic Martingale approach, doubling the lot size after each consecutive loss in an attempt to recover all previous losses with a single win. Money management starts with a small initial lot size, but positions grow exponentially with each loss, and there is typically no hard cap on the number of doublings. This strategy may work in ranging markets but faces catastrophic drawdown risk in trending markets where consecutive losses cause position sizes to escalate uncontrollably.

Strengths

  • CCI is a well-established overbought/oversold indicator with clear and interpretable signal logic
  • In ranging markets, mean reversion combined with Martingale can recover losses quickly
  • The small initial lot size provides some buffer for the account
  • Parameters are adjustable, allowing users to tune multiplier and CCI thresholds to their risk tolerance
  • The code structure is relatively simple, making it easy to understand and modify

Weaknesses

  • The Martingale strategy causes exponential lot size growth during consecutive losses, creating extremely high risk of account blow-up
  • No stop loss is set (StopLoss=0), leaving losing positions completely unprotected
  • No maximum doubling limit, potentially leading to infinitely escalating position sizes
  • CCI generates persistent false signals during strong trends, compounding Martingale losses
  • Does not account for account balance or margin ratio, potentially attempting to open positions when margin is insufficient

Possible improvements

  • Add a maximum Martingale doubling limit to prevent unlimited lot size growth
  • Implement a hard stop loss to avoid excessive single-trade losses
  • Add account balance and margin checks to stop trading when margin is insufficient
  • Incorporate a trend filter (e.g., moving average direction) to pause entries against the prevailing trend
  • Add a maximum drawdown limit that halts all trading when the threshold is reached

Risk assessment

Overall risk: Dangerous

  • Martingale strategy causes exponential lot growth; consecutive losses can blow up the account
  • No stop loss means single trade losses have no upper bound
  • No maximum doubling limit allows positions to escalate indefinitely
  • CCI persistently generates counter-trend signals in trending markets, compounding losses
  • Lack of margin checks may attempt to place orders even when funds are insufficient

Evaluation scores

Code quality2.0
Strategy logic2.0
Risk management1.0
Robustness1.0
Innovation1.0
Documentation1.0
Overall1.3

Parameters

ParameterDefaultDescription
CCI_Period14CCI indicator calculation period
Overbought_Level100CCI overbought threshold; sell above this level
Oversold_Level-100CCI oversold threshold; buy below this level
Initial_Lot0.01Initial lot size
Multiplier2.0Martingale multiplier for lot size after loss
TakeProfit500Take profit in points, typically set at gap close
StopLoss0Stop loss in points, 0 to disable
Max_Spread30Maximum allowed spread

Similar Martingale EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.