EA-155 · Martingale

MartGreg_1

This EA uses a dual MACD crossover strategy to generate buy and sell signals, combined with a Martingale position-sizing system that doubles the lot size after consecutive losses. It enters trades only when no position is already open, with fixed stop-loss and take-profit levels. The OnTester function evaluates profitability relative to maximum drawdown.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryMartingale
RiskDangerous
Blow-up riskElevated
Rating★☆☆☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsMACD
AuthorAlf.

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.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: 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 dual MACD crossover signals for trend determination, using two MACD indicators with different parameters for confluence-confirmed entries. Entry conditions for long: MACD1 histogram turns up from below (t[0]>t[1] and t[1]<t[2]) and MACD2 histogram is rising (k[1]>k[0]); short conditions are the inverse. Exit conditions rely on fixed stop-loss and take-profit at Stop=500 points and Tp=1500 points respectively. Position sizing employs a Martingale system implemented via the Martingail class, doubling lot size after each loss with the doubling count controlled by the Ud parameter and base lot determined by DML=1000. Money management persists the Martingale state via global variables across EA restarts, but there is no maximum drawdown limit or account equity protection mechanism.

Strengths

  • Dual MACD confluence confirmation improves signal reliability and reduces false signals
  • Take-profit exceeds stop-loss (Tp=1500 vs Stop=500), yielding a 3:1 reward-to-risk ratio with positive expectancy potential
  • OnTester function accounts for max consecutive losses and profit/loss ratio, providing a reasonable strategy evaluation framework

Weaknesses

  • Martingale position sizing exponentially amplifies risk during consecutive losses, potentially causing account blowup
  • Only allows single-direction position (PositionSelect check), cannot trade both directions simultaneously, missing counter-trend opportunities
  • Lacks new bar check; tick_volume>1 filter is unreliable and may cause duplicate entries

Possible improvements

  • Add maximum Martingale multiplier limit and account equity protection to prevent account blowup from consecutive losses
  • Add new bar detection logic replacing tick_volume filter to avoid duplicate entries within the same bar

Risk assessment

Overall risk: Dangerous

  • Martingale strategy exponentially increases position size after consecutive losses, potentially depleting account rapidly in extreme markets
  • No maximum drawdown limit or account balance protection mechanism
  • Only checks positions for the symbol but not pending orders, may open duplicate trades when pending orders exist

Evaluation scores

Code quality2.0
Strategy logic2.0
Risk management1.0
Robustness2.0
Innovation1.0
Documentation1.0
Overall1.5

Parameters

ParameterDefaultDescription
DML1000Martingale base lot amount
Ud1Number of doubles after loss
Stop500Stop loss in points
Tp1500Take profit in points
Slipage50Allowed slippage
MACD1Fast5MACD1 fast EMA period
MACD1Slow20MACD1 slow EMA period
MACD2Fast10MACD2 fast EMA period
MACD2Slow15MACD2 slow EMA period

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.