EA-1096 · Momentum

Exp_XMACD

This EA trades based on the XMACD custom indicator, offering four distinct signal modes: zero-line breakthrough, MACD direction change, signal line direction change, and MACD-signal line crossover. It opens and closes positions according to the selected mode with configurable money management, stop loss, and take profit settings.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryMomentum
RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsXMACD, EMA, SMA
AuthorCopyright © 2012, Nikolay Kositsin

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Run error
GBPUSD0.00%0.00%0.00%0—————Run error
USDJPY0.00%0.00%0.00%0—————Run error
XAUUSD0.00%0.00%0.00%0—————Run error

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: No blow-up pattern found

None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.

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

This EA implements a momentum-based strategy using the XMACD indicator, which is an extended version of the traditional MACD supporting multiple smoothing algorithms (SMA, EMA, JJMA, JurX, etc.) and various price types. The strategy offers four entry modes: the zero-line breakthrough mode trades when the MACD histogram crosses zero; the MACD twist mode trades when the MACD changes direction; the signal line twist mode trades when the signal line changes direction; and the MACD crossover mode trades when the MACD histogram crosses the signal line, which is the most classic MACD trading approach. Exit conditions include closing positions on reverse signals, fixed stop loss, and take profit levels. Position sizing is controlled via the MM parameter, where negative values represent fixed lot sizes and positive values represent a percentage of the deposit. The strategy uses an IsNewBar mechanism to prevent repeated trading within the same bar and employs a Recount flag to recalculate signals when data copying fails.

Strengths

  • Offers four trading modes providing high strategic flexibility to adapt to different market conditions
  • Uses IsNewBar mechanism to prevent repeated trades within the same bar, reducing overtrading
  • Supports multiple smoothing algorithms and price types, making XMACD more powerful than standard MACD
  • Provides granular permission controls for buy/sell opening and closing positions independently
  • Fixed stop loss and take profit settings provide defined risk management

Weaknesses

  • No trailing stop mechanism, profits may be reduced by market retracements
  • No spread filter, potentially generating false signals in high-spread environments
  • The MM parameter design where negative values mean fixed lots is unintuitive and error-prone
  • Lacks position checking logic before opening trades, risking duplicate positions
  • Depends on external iCustom indicator, the EA will fail if the XMACD indicator file is missing

Possible improvements

  • Add a trailing stop feature to lock in more profits during trend continuation
  • Add spread filter and maximum position check to improve trading robustness
  • Redesign the MM parameter using an enum to distinguish between fixed lot and percentage modes, eliminating the confusing negative value convention

Risk assessment

Overall risk: Medium

  • No position count check, potentially opening duplicate positions in the same direction
  • Fixed stop loss/take profit values are large (1000/2000 points), allowing significant per-trade losses
  • Depends on external custom indicator; when missing, only a warning is printed but the EA continues running

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness2.0
Innovation3.0
Documentation2.0
Overall2.7

Parameters

ParameterDefaultDescription
MM-0.1Trade volume ratio; negative=fixed lot, positive=deposit percentage
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Max price deviation (slippage tolerance) in points
BuyPosOpentrueAllow buy position open
SellPosOpentrueAllow sell position open
BuyPosClosetrueAllow close long positions
SellPosClosetrueAllow close short positions
ModeMACDdispositionEntry algorithm: zero-line breakout / MACD reversal / signal line reversal / MACD crossover
InpInd_TimeframePERIOD_H4Arrows_Curves indicator timeframe
XMA_MethodMODE_EMAMACD histogram smoothing method
Fast_XMA12Fast moving average period
Slow_XMA26Slow moving average period
XPhase100Smoothing parameter, JJMA range -100 to +100
Signal_MethodMODE_SMASignal line smoothing method
Signal_XMA9Signal line period
Signal_Phase100Signal line smoothing parameter
AppliedPricePRICE_CLOSE_Price constant type
SignalBar1Bar index for entry signal

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.