EA-62742 · Momentum

Multi Divergence EA

This EA detects divergence patterns across three momentum indicators (RSI, MACD, Stochastic) and enters trades when a configurable minimum number of confirmations align. It applies trend and volume filters before opening positions, and uses fixed lot sizing or risk-based money management with configurable stop loss and take profit.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryMomentum
RiskMedium
Blow-up riskHigh
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsRSI, MACD, Stochastic, EMA, Volumes
AuthorLe Trung Kien Hoang

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————No trades
GBPUSD0.00%0.00%0.00%0—————No trades
USDJPY0.00%0.00%0.00%0—————No trades
XAUUSD-92.78%-88.60%95.04%7550.70%-0.49-0.984−$123.70Account stopped out

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 Momentum EAs with a reliable result on the same market: XAUUSD: better than 27% of 75

Month by month

MarketMonths with a gainBest monthWorst month
XAUUSD31%+11.15% 2026-04-80.01% 2026-05

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

Blow-up risk: High

  • Hit a stop-out in our backtest (equity below 10%) on XAUUSD

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 core is a multi-indicator divergence detection system for momentum reversal trading. Entry conditions require divergence between price and indicator (e.g., price making lower low while indicator makes higher low signals bullish divergence), with at least MinConfirmations indicators confirming the signal, plus optional trend filter requiring price to be on the correct side of EMA50, and optional volume filter requiring recent volume to exceed 1.2x the average. Exit conditions rely on fixed point-based stop loss and take profit, with no trailing stop or dynamic exit mechanism. Position sizing supports both fixed lot size and risk-based calculation using account balance percentage, where the latter dynamically computes lot size based on stop loss points and tick value with normalization. The money management module respects minimum/maximum lot and step constraints but lacks margin verification. Overall strategy logic is clear, but divergence detection only compares the two most recent extrema, potentially missing more complex divergence patterns.

Strengths

  • Multi-indicator divergence confirmation mechanism improves signal reliability and reduces false signal risk
  • Multiple entry filters including spread filter, trend filter, and volume filter enhance trade quality
  • Money management module respects instrument specifications such as min/max lot and lot step constraints
  • Clean code structure with well-separated functional modules makes it easy to understand and maintain

Weaknesses

  • Ask and Bid variables are incorrectly assigned SYMBOL_ASK and SYMBOL_BID constants instead of real-time prices, causing critical errors in spread calculation and order pricing
  • Divergence detection only compares the two most recent extrema, cannot detect complex multi-point divergence patterns, and unsorted extrema arrays may compare mismatched pairs
  • CalculateDivergenceStrength formula has logic flaws: simply adding price and indicator changes doesn't properly measure divergence strength, and using MathAbs in denominator may cause division by zero
  • Lacks margin check, order fill type setting, and slippage control, which may cause real trading failures due to insufficient margin or excessive slippage
  • Trend filter logic contradicts divergence nature: bullish divergence requires price above EMA, but as a reversal signal, price is typically below EMA at that point

Possible improvements

  • Fix Ask/Bid variables: should use SymbolInfoDouble to get real-time bid/ask prices instead of assigning constants to double variables
  • Improve divergence strength calculation: use normalized directional divergence between price and indicator changes instead of simple addition
  • Add multi-point divergence detection and time-sorted extrema pairing to improve accuracy and capture complex patterns
  • Add margin check (OrderCalcCheck), configurable order fill type, and slippage tolerance parameters
  • Reconsider trend filter logic: for divergence reversal strategies, entry should be allowed when price is on the opposite side of EMA

Risk assessment

Overall risk: Medium

  • Ask/Bid variable assignment bug is critical, causing all trades to execute at wrong prices and spread calculation to completely fail
  • CalculateDivergenceStrength may cause division by zero errors leading to EA crash or invalid signals
  • Lack of margin check may attempt orders when account has insufficient funds, causing errors
  • Trend filter logic contradicts divergence reversal strategy, potentially filtering out valid signals

Evaluation scores

Code quality2.0
Strategy logic3.0
Risk management3.0
Robustness2.0
Innovation3.0
Documentation1.0
Overall2.3

Parameters

ParameterDefaultDescription
LotSize0.1Fixed lot size
StopLoss100Stop loss in pips per order
TakeProfit200Overall grid profit target in currency
MaxSpread30Maximum allowed spread
UseMoneyManagementfalseEnable money management
RiskPercent2.0Risk per trade as % of account equity
RSI_Period14RSI period
MACD_Fast12MACD fast EMA period
MACD_Slow26MACD slow EMA period
MACD_Signal9MACD signal line period
Stoch_K5Stochastic %K period
Stoch_D3Stochastic %D period
Stoch_Slowing3Stochastic smoothing period
BarsToCheck50Bar range for divergence detection
MinBarsDistance5Minimum bar distance between extremum points
MinDivergenceStrength0.7Minimum divergence strength threshold (0-1)
MinConfirmations3Minimum indicator confirmations required (1-3)
UseVolumeFiltertrueEnable volume confirmation filter
UseTrendFiltertrueEnable trenddirectionfilter
AllowBuytrueAllow buytrading
AllowSelltrueAllow selltrading
MaxTrades1Maximum simultaneous positions
MagicNumber123456Order magic number to identify this EA's orders

Similar Momentum 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.