Robot_MACD
This EA trades based on MACD signal line crossovers, entering long positions when MACD crosses above its signal line and short positions when it crosses below. It uses fixed lot sizing and implements basic stop loss and take profit levels for trade management. The strategy is a classic momentum-following approach relying on MACD histogram direction changes for trade signals.
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 | +32.44% | +27.66% | 29.47% | 119 | 48.30% | 0.87 | 1.10 | 8 | +$30.37 | Reliable |
| GBPUSD | -21.65% | -19.10% | 56.96% | 118 | 47.90% | -0.01 | -0.38 | 5 | −$15.93 | Reliable |
| USDJPY | -75.35% | -70.38% | 82.17% | 119 | 49.20% | -1.18 | -0.92 | 5 | −$64.45 | Reliable |
| XAUUSD | -100.00% | -100.00% | 100.00% | 21 | 61.90% | -1.12 | -1.00 | 4 | −$605.10 | Account stopped out |
Profitable on 1 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 100% of 68 · GBPUSD: better than 0% of 66 · USDJPY: better than 0% of 68 · XAUUSD: better than 0% of 75
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 69% | +14.61% 2026-10 | -14.24% 2026-06 |
| GBPUSD | 46% | +28.21% 2025-12 | -28.20% 2026-03 |
| USDJPY | 31% | +8.88% 2026-04 | -36.54% 2026-08 |
| XAUUSD | 33% | +136.97% 2025-11 | -100.00% 2026-01 |
From the backtest equity curve, sampled about every two days; only reliable results.
Blow-up risk: High
- Has no stop loss or trailing stop
- 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
This EA employs the classic MACD crossover strategy as its core trading logic, leveraging the trend-following characteristics of the Moving Average Convergence Divergence indicator to capture medium-term momentum shifts. Entry conditions are based on MACD main line crossing the signal line: a long position is opened when MACD crosses above the signal line, and a short position when it crosses below. Exit conditions rely on predefined stop loss and take profit levels, with some implementations potentially including a MACD reverse crossover exit mechanism. Position sizing uses a fixed lot approach without dynamic adjustment based on account equity or risk percentage. Money management is relatively weak, lacking maximum position limits, maximum drawdown controls, and equity-proportional sizing mechanisms. The overall strategy logic is simple and clear, but it is prone to generating frequent false signals during ranging or choppy market conditions, leading to consecutive losses.
Strengths
- Strategy logic is simple and clear, easy to understand and verify
- MACD is a well-tested classic momentum indicator with solid theoretical foundation
- Includes stop loss and take profit, providing a basic risk control framework
- Adjustable parameters allow users to optimize for different instruments and timeframes
- Code structure is typically well-organized, suitable as a learning reference
Weaknesses
- Fixed lot sizing ignores account equity ratio, making risk exposure uncontrolled
- MACD generates frequent false signals in ranging markets leading to consecutive losses
- Lacks new bar check mechanism, potentially opening multiple positions on the same bar
- No maximum position limit or maximum drawdown protection implemented
- Does not account for spread and slippage impact on short-term trades
Possible improvements
- Introduce dynamic position sizing that automatically calculates lots based on account balance and risk percentage
- Add trend filter conditions (such as ADX or higher timeframe moving averages) to avoid false signals in ranging markets
- Implement new bar detection to prevent repeated entries on the same bar, and add spread filter conditions
Risk assessment
Overall risk: Medium
- Fixed lot size not linked to account equity, creating excessive risk exposure with larger accounts
- Lacks maximum position and drawdown protection, potentially causing significant losses in extreme markets
- Frequent MACD crossovers in ranging markets lead to consecutive stop loss hits and cumulative losses
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
LotSize | 0.1 | Fixed lot size per trade |
StopLoss | 50 | Stop loss in points |
TakeProfit | 100 | Take profit in points |
MACD_FastEMA | 12 | MACD fast EMA period |
MACD_SlowEMA | 26 | MACD slow EMA period |
MACD_SignalSMA | 9 | MACD signal SMA period |
MagicNumber | 12345 | EA magic number for identifying orders |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.