MACDCCI
This EA combines MACD and CCI indicators to generate trading signals, entering long positions when MACD confirms upward momentum and CCI indicates oversold-to-neutral recovery, and entering short positions on the opposite conditions. It is a systematic momentum-based strategy that relies on dual-indicator confluence for trade entries. The EA manages positions with fixed stop loss and take profit levels.
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.55% | -0.48% | 2.57% | 31 | 32.30% | -0.16 | -0.21 | 6 | −$1.78 | Reliable |
| GBPUSD | -2.60% | -2.26% | 5.18% | 33 | 45.50% | -0.65 | -0.50 | 4 | −$7.87 | Reliable |
| USDJPY | -1.28% | -1.12% | 1.81% | 34 | 44.10% | -0.57 | -0.71 | 4 | −$3.78 | Reliable |
| XAUUSD | -26.87% | -22.79% | 42.71% | 23 | 52.20% | -0.53 | -0.63 | 4 | −$116.84 | Reliable |
Profitable on 0 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 50% of 68 · GBPUSD: better than 38% of 66 · USDJPY: better than 46% of 68 · XAUUSD: better than 43% of 75
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 38% | +2.41% 2026-04 | -1.39% 2026-09 |
| GBPUSD | 31% | +1.38% 2026-11 | -1.11% 2026-03 |
| USDJPY | 31% | +1.59% 2026-04 | -1.33% 2025-11 |
| XAUUSD | 46% | +7.03% 2026-09 | -20.08% 2026-03 |
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 concept uses MACD momentum direction combined with CCI overbought/oversold levels to form confluence trading signals. Entry conditions: for long positions, MACD histogram must be positive or the MACD main line above the signal line, while CCI crosses up from oversold territory or sits in the neutral zone; short conditions are the reverse. Exit conditions rely on preset fixed stop loss and take profit levels, with no trailing stop or dynamic exit mechanism. Position sizing uses fixed lots without dynamic adjustment based on account balance or market volatility. Money management lacks percentage-based risk calculation tied to account equity. Overall the strategy logic is simple and clear, but it lacks adaptability to different market states (trending vs ranging).
Strengths
- Dual-indicator confluence filters false signals and improves entry quality
- Simple and clear strategy logic, easy to understand and optimize
- Fixed stop loss and take profit make risk predictable
- MACD and CCI complement each other — MACD catches trend direction while CCI catches extreme reversals
- Clean code structure suitable as a learning reference or base for further development
Weaknesses
- Fixed lot position sizing without dynamic adjustment based on account risk
- No market state identification, likely to suffer frequent losses in ranging markets
- No trailing stop mechanism, may not fully capture profits from strong trends
- No spread filter, entry costs may be excessive in high-spread environments
- No new bar check, potentially opening multiple positions on the same candle
Possible improvements
- Add dynamic position sizing based on ATR or account equity percentage
- Implement trend/range market state detection to reduce or pause trading in non-trending conditions
Risk assessment
Overall risk: Medium
- Missing new bar check may cause repeated position opening on the same candle
- Fixed lot sizing without account risk proportion adjustment creates uncontrolled exposure for large accounts
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MACD_FastEMA | 12 | MACD fast EMA period |
MACD_SlowEMA | 26 | MACD slow EMA period |
MACD_SignalSMA | 9 | MACD signal SMA period |
CCI_Period | 14 | CCI indicator period |
CCI_Overbought | 100 | CCI overbought threshold |
CCI_Oversold | -100 | CCI oversold threshold |
StopLoss | 50 | Stop loss in points |
TakeProfit | 100 | Take profit in points |
LotSize | 0.1 | Fixed trading lot size |
MagicNumber | 17115 | EA magic number for distinguishing orders |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.