MA MACD Position averaging
This EA uses a combination of Moving Average and MACD indicators to generate trade signals, then employs a position averaging (martingale-style) strategy when positions go into loss. It opens additional positions at a defined step distance to average down the entry price, closing all positions when the overall portfolio reaches a profit target.
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.97% | -0.84% | 3.72% | 109 | 49.10% | — | — | — | — | Same as other EAs |
| GBPUSD | +6.69% | +5.79% | 4.59% | 107 | 51.40% | — | — | — | — | Same as other EAs |
| USDJPY | +3.63% | +3.14% | 4.42% | 99 | 51.50% | — | — | — | — | Same as other EAs |
| XAUUSD | -3.39% | -2.81% | 49.78% | 104 | 51.50% | — | — | — | — | Same as other EAs |
On every market this backtest is identical to EA-17162, EA-17352, EA-22409. 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)
- Can hold up to 5 positions at once
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 confirmation of MA trend direction and MACD signal line crossover or histogram direction for trade entry. When price moves against the position by a defined Step distance, the EA adds positions with increased lot size (multiplied by LotExponent) to average down the entry price. Entry conditions require MA direction confirmation combined with MACD signal crossover or histogram direction alignment. Exit conditions trigger when the total floating profit of all same-direction positions reaches the TakeProfit target, at which point all positions are closed simultaneously. Position sizing follows a martingale-style progression where each additional position's lot size is multiplied by LotExponent, meaning the larger the loss, the heavier the position becomes. Money management lacks a hard stop loss, relying entirely on price reverting after averaging down, which carries significant margin call risk in trending markets.
Strengths
- MA+MACD dual filter improves entry signal quality compared to pure martingale strategies
- Position averaging recovers efficiently in ranging markets by exploiting price fluctuations
- Highly configurable parameters allow traders to adjust multiplier, step distance, and max trades to control risk exposure
- Overall take-profit mechanism ensures profits are locked once price reverts, with clear logic
Weaknesses
- Martingale-style position sizing causes exponential lot growth in trending markets,easilyleading to margin calls
- No hard stop loss protection means the strategy relies entirely on price reversion, risking catastrophic losses in strong trends
- LotExponent multiplier greater than 1 causes rapid lot size growth, draining capital faster than most traders anticipate
- Lacks new bar check mechanism, potentially opening multiple positions within the same candle
- Does not account for spread and commission costs on averaging effectiveness, making actual breakeven distance larger than theoretical
Possible improvements
- Add hard stop loss mechanism with maximum loss amount or maximum drawdown percentage limit to prevent margin calls
- Implement new bar check and spread filter to avoid repeated entries within the same candle and trading during high spread conditions
- Cap maximum total lot size or maximum risk exposure as a percentage of account equity as a safety valve
- Optimize the averaging strategy by considering fixed-lot increments instead of multiplicative scaling to reduce exponential risk
Risk assessment
Overall risk: Dangerous
- Martingale-style position averaging without stop loss can cause exponential position growth leading to margin calls in trending markets
- No new bar check mechanism risks multiple entries within the same candle amplifying exposure
- No spread filter means averaging costs are amplified in high-spread environments
- Maximum trade count limited only by MaxTrades parameter with no account equity safety valve
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
LotSize | 0.01 | Trade lot size per order |
LotExponent | 1.5 | Lot multiplier for additional positions (Martingale ratio) |
MaxTrades | 10 | Maximum position additions |
Step | 50 | Position addition distance in points |
TakeProfit | 30 | Overall take profit target in points |
MA_Period | 200 | Moving average period |
MACD_FastEMA | 12 | MACD fast EMA period |
MACD_SlowEMA | 26 | MACD slow EMA period |
MACD_SignalSMA | 9 | MACD signal SMA period |
Similar Martingale EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.