EA-22854 · Martingale

MA MACD Position averaging v2

This EA uses a combination of Moving Average and MACD indicators to generate trade signals, then employs a position averaging (martingale-style) strategy by adding to losing positions at predetermined intervals. It opens initial positions based on MA/MACD crossover signals and progressively increases lot size as price moves against the position, aiming to recover losses when the market reverses.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryMartingale
RiskHigh risk
Blow-up riskElevated
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsMA, MACD
AuthorCopyright © 2018, Vladimir Karputov

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-3.86%-3.36%5.35%9647.40%-0.95-0.727−$3.71Reliable
GBPUSD+4.91%+4.25%5.01%9750.50%0.940.987+$5.06Reliable
USDJPY+1.89%+1.64%4.59%9247.80%0.480.415+$2.05Reliable
XAUUSD+28.20%+22.78%60.37%8852.90%0.690.477+$35.26Reliable

Profitable on 3 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 19% of 16 · GBPUSD: better than 80% of 15 · USDJPY: better than 44% of 16 · XAUUSD: better than 44% of 16

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD23%+2.07% 2026-04-1.69% 2026-08
GBPUSD62%+3.00% 2026-07-2.51% 2026-10
USDJPY54%+3.16% 2026-04-1.91% 2026-03
XAUUSD62%+41.03% 2026-01-27.25% 2026-03

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 combines a dual-confirmed trend-following entry using MA and MACD indicators with a martingale-style position averaging approach for position management. Entry conditions require alignment between the MA direction and MACD signal line crossover, providing dual indicator confirmation to reduce false signals. Exit conditions depend on the overall portfolio reaching a profit target or hitting a stop loss, rather than individual trade profit/loss. Position sizing employs an averaging-down model where additional positions are opened at fixed pip intervals with increasing lot sizes (typically doubling or scaling by a coefficient), which is a classic martingale characteristic. Money management attempts to limit extreme risk by setting a maximum number of averaging steps and a total stop loss, but the inherently escalating lot sizes cause risk to grow exponentially during losing streaks. The strategy performs well in ranging markets but can suffer catastrophic losses in strong trending markets where price continuously moves against the accumulated position.

Strengths

  • Dual indicator confirmation reduces false signal probability
  • Averaging strategy effectively reduces average cost and profits in ranging markets
  • Well-parameterized design with adjustable averaging count and step for optimization
  • Maximum averaging count limit prevents infinite position accumulation
  • Long-period MA filtering effectively reduces counter-trend trades

Weaknesses

  • Martingale-style averaging causes exponentially growing risk in trending markets
  • Stop loss set to 0 means no protection during extreme market moves
  • Escalating lot sizes dramatically increase margin call risk with each averaging step
  • Lack of account balance check may attempt averaging even with insufficient margin
  • Does not account for spread and commission impact on breakeven threshold

Possible improvements

  • Add a mandatory total stop loss or maximum account drawdown limit as a safety net
  • Implement available margin check before opening averaging positions to ensure sufficient funds
  • Add spread filter and commission calculation to prevent small profits from being consumed by trading costs

Risk assessment

Overall risk: High risk

  • Martingale averaging strategy can lead to account blow-up in strong trending markets
  • Default stop loss of 0 provides no downside protection
  • No margin sufficiency check may attempt averaging with insufficient funds

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management1.0
Robustness2.0
Innovation2.0
Documentation2.0
Overall2.2

Parameters

ParameterDefaultDescription
LotSize0.01Trade lot size per order
MAPeriod200Moving average period
MACDFastEMA12MACD fast EMA period
MACDSlowEMA26MACD slow EMA period
MACDSignalSMA9MACD signal SMA period
AveragingStep500Distance between additional positions in points
LotMultiplier1.5position additionlot size multiplier
MaxAveragingCount5Maximum position additions
TakeProfit1000Overall take profit target in points
StopLoss0stop losspoints (0meansnostop loss)
MagicNumber12345EA magic number for trade 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.