EA-39234 · Martingale

MACD Four Colors 2 Martingale

This EA trades based on a four-color MACD indicator signal and employs a martingale position-sizing strategy, doubling the lot size after each losing trade. It enters long when MACD turns bullish (color change) and short when MACD turns bearish, with the martingale layer intended to recover losses from prior trades. The strategy relies on eventual mean reversion of price to close the martingale chain in profit.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryMartingale
RiskDangerous
Blow-up riskElevated
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsMACD, EMA, SMA
AuthorCopyright © 2022, Vladimir Karputov

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD+1.39%+1.21%3.98%13047.30%————Same as other EAs
GBPUSD+3.37%+2.92%3.45%12949.20%————Same as other EAs
USDJPY-7.43%-6.49%8.50%12650.00%————Same as other EAs
XAUUSD-39.73%-34.19%75.80%13648.90%————Same as other EAs

On every market this backtest is identical to EA-39688. The automatic conversion almost certainly lost what makes this EA different (a custom indicator, a filter or the money management), so these results are not ranked or counted.

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: 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 concept uses a four-color MACD indicator to determine trend direction and momentum shifts, with color transitions serving as entry signals. Entry conditions: open a long position when the MACD histogram turns from negative to positive and changes to a bullish color, and open a short position when it turns from positive to negative with a bearish color. Exit conditions typically rely on a take-profit target or a reverse MACD signal, but the martingale mechanism means losing trades are not closed with a stop-loss; instead, the lot size is doubled on the next trade to recover losses. Position sizing follows the classic martingale method, multiplying the lot size by a configurable factor (typically 2x) after each loss, attempting to cover all prior losses with a single winning trade. Money management is the weakest point, as the absence of a hard stop-loss creates existential risk — the account can be wiped out during a prolonged losing streak when margin is exhausted. The strategy appears profitable in the short term but carries catastrophic tail risk during black swan events.

Strengths

  • The four-color MACD provides more nuanced trend and momentum readings than traditional two-color MACD, yielding clearer entry signals
  • The martingale approach can recover losses quickly in ranging markets and produce consistent short-term profits in backtesting
  • A maximum order layer limit partially constrains the unlimited expansion risk inherent in martingale systems

Weaknesses

  • The martingale strategy causes lot sizes to grow exponentially during strong trending markets, easily leading to margin call and account wipeout
  • Default stop-loss is zero, lacking hard stop-loss protection — a single extreme move can destroy the entire account
  • The four-color MACD signal frequently switches colors in low-volatility or sideways markets, generating many false signals and repeated losses
  • Spread and commission costs are not factored in; longer martingale chains incur progressively higher transaction costs, raising the actual breakeven threshold

Possible improvements

  • Add a hard stop-loss mechanism — even with martingale, an account-level maximum drawdown stop should protect capital
  • Implement spread filtering and new bar checking to avoid opening positions during high-spread conditions or trading multiple times on the same bar
  • Consider replacing pure martingale with a limited-step counter-trend pyramiding strategy combined with a trend filter to avoid adding positions against strong trends

Risk assessment

Overall risk: Dangerous

  • Martingale lot sizes grow exponentially; after consecutive losses, position size far exceeds account capacity, creating margin call risk
  • No stop-loss by default means unlimited per-trade loss in extreme market conditions
  • No spread filter — widening spreads during volatile sessions amplify losses
  • No new bar check may cause repeated position opening within the same candle

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management1.0
Robustness2.0
Innovation2.0
Documentation1.0
Overall1.8

Parameters

ParameterDefaultDescription
Lots0.01Initial lot size
Multiplier2.0Martingale multiplier, lot size multiplied after loss
TakeProfit500Take profit in points per level
StopLoss0Stop loss in points per level, 0 for none
MACD_FastEMA12MACD fast EMA period
MACD_SlowEMA26MACD slow EMA period
MACD_SignalSMA9MACD signal SMA period
MaxOrders10Maximum Martingale level limit
MagicNumber39234EA magic number for order identification

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.