Exp_Digital_MACD
This EA trades based on the Digital_MACD custom indicator, offering four different entry algorithms: zero-line breakout, MACD direction change, signal line direction change, and MACD/Signal crossover. It supports configurable position sizing, stop loss/take profit, and permission toggles for long/short entry and exit.
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 | -6.18% | -5.39% | 8.55% | 113 | 41.60% | -1.35 | -0.72 | 7 | −$5.47 | Reliable |
| GBPUSD | +1.73% | +1.50% | 5.37% | 112 | 46.80% | 0.32 | 0.32 | 5 | +$1.29 | Reliable |
| USDJPY | -4.15% | -3.61% | 6.06% | 113 | 40.20% | -0.65 | -0.69 | 7 | −$3.56 | Reliable |
| XAUUSD | +36.31% | +29.17% | 75.41% | 151 | 54.30% | 0.84 | 0.48 | 4 | +$24.05 | Reliable |
Profitable on 2 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 Momentum EAs with a reliable result on the same market: EURUSD: better than 10% of 68 · GBPUSD: better than 74% of 66 · USDJPY: better than 21% of 68 · XAUUSD: better than 71% of 75
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 46% | +1.12% 2026-09 | -2.98% 2026-03 |
| GBPUSD | 69% | +1.53% 2026-06 | -1.82% 2026-04 |
| USDJPY | 38% | +1.31% 2025-11 | -2.07% 2026-05 |
| XAUUSD | 69% | +53.11% 2026-08 | -44.93% 2026-02 |
From the backtest equity curve, sampled about every two days; only reliable results.
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
The core strategy of this EA is momentum trading based on the Digital_MACD custom indicator, offering four selectable entry modes. The 'breakdown' mode enters when the MACD histogram crosses the zero line, acting as a trend confirmation strategy. The 'MACDtwist' mode enters when the MACD line changes direction, functioning as a momentum reversal strategy. The 'SIGNALtwist' mode enters when the signal line changes direction, providing a smoother signal response. The 'MACDdisposition' mode enters on MACD/signal line crossover, which is the classic MACD crossover approach. For exits, the EA uses fixed stop loss and take profit in points (default 1000 and 2000), while opposing signals also trigger position closure. Position sizing supports deposit-share-based lot calculation (MM parameter default 0.1) with a MarginMode enum for lot calculation method selection. The EA calculates signals on each new bar to avoid tick-level noise, but lacks scaling, partial close, and trailing stop mechanisms.
Strengths
- Offers four different entry algorithm modes with high flexibility to adapt to different market conditions
- Supports independent permission control for long/short entry and exit with fine-grained risk management
- Calculates signals on new bars only, avoiding tick-level overtrading and reducing false signals and trading costs
- Uses the custom Digital_MACD indicator for more refined signal processing than standard MACD
- Configurable stop loss and take profit with a default 2:1 reward-to-risk ratio favorable for long-term positive expectancy
Weaknesses
- Lacks a trailing stop mechanism, unable to lock in floating profits during favorable moves
- Fixed point-based stop loss and take profit without ATR-based volatility adaptation leads to uneven risk across varying volatility environments
- Depends on the custom Digital_MACD indicator file; EA will fail to initialize if the indicator is missing
- No position scaling (add/reduce) logic, missing opportunities to pyramid into strong trends
- No spread filter included, potentially leading to unfavorable entries during high-spread conditions
Possible improvements
- Add ATR-based dynamic stop loss and take profit for volatility-adaptive risk management
- Implement a trailing stop feature to automatically protect profits once a threshold is reached
Risk assessment
Overall risk: Low
- Fixed stop loss and take profit without volatility adaptation may be too tight or too loose during extreme market conditions
- Dependency on external custom indicator file creates initialization failure risk
- MM parameter default of 0.1 (10% of deposit) per trade represents significant single-trade risk at high leverage
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Deposit percentage per trade |
MMMode | LOT | Lot calculation method (fixed lot or percentage) |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Max slippage tolerance in points |
BuyPosOpen | true | Allow buy position opening |
SellPosOpen | true | Allow sell position opening |
BuyPosClose | true | Allow long position closing |
SellPosClose | true | Allow short position closing |
Mode | MACDtwist | Entry algorithm mode |
InpInd_Timeframe | PERIOD_H4 | Indicator timeframe |
Signal_Method | MODE_SMA | Signal line smoothing method |
Signal_XMA | 5 | Signal line period |
Signal_Phase | 100 | Signal line phase parameter |
AppliedPrice | PRICE_CLOSE_ | Applied price constant |
SignalBar | 1 | Bar index for entry signal |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.