MACD Strategy Templates

Strategy Overview
Section titled “Strategy Overview”- MACD Signal Line + ADX — Crossovers in trending markets
- MACD + RSI — Momentum confluence
- MACD + EMA Direction — Trend confirmation with timing
Strategy 1: MACD Signal Line + ADX
Overview
Trade MACD signal line crossovers only in trending markets (ADX > 25).
When This Works Best
- Trending markets
- 4H to 1D timeframes
Algorithm Configuration
| Setting | Value |
|---|---|
| Type | BOTH |
| Position Size | 45% of equity (REL) |
| Order Type | MARKET |
| Timeout | COOLDOWN_ONLY, 3 bars |
Long Entry Conditions
| Group | Indicator | Signal | Threshold |
|---|---|---|---|
| Required | MACD | macdLine_above_signalLine | — |
| Required | ADX | adx_above_threshold | 25 |
Long Exit Conditions
| Setting | Value |
|---|---|
| Required | MACD · macdLine_below_signalLine |
| Stop Loss | 5% (REL), trailing |
| Take Profit | 10% (REL) |
Short Entry Conditions
| Group | Indicator | Signal | Threshold |
|---|---|---|---|
| Required | MACD | macdLine_below_signalLine | — |
| Required | ADX | adx_above_threshold | 25 |
Short Exit Conditions
| Setting | Value |
|---|---|
| Required | MACD · macdLine_above_signalLine |
| Stop Loss | 5% (REL), trailing |
| Take Profit | 10% (REL) |
Recommended Parameters
| Indicator | Parameter | Value | Notes |
|---|---|---|---|
| MACD | Fast | 12 bars | Standard |
| MACD | Slow | 26 bars | Standard |
| MACD | Signal | 9 bars | Standard |
| ADX | Threshold | 25 | Trend filter |
Strategy 2: MACD + RSI Momentum
Overview
MACD crossover confirmed by RSI not being overbought/oversold.
When This Works Best
- Momentum transitions
- 1H to 4H timeframes
Algorithm Configuration
| Setting | Value |
|---|---|
| Type | BOTH |
| Position Size | 35% of equity (REL) |
| Order Type | MARKET |
| Timeout | REGULAR, 2 bars |
Long Entry Conditions
| Group | Indicator | Signal | Threshold |
|---|---|---|---|
| Required | MACD | macdLine_above_signalLine | — |
| Required | RSI | rsi_below_threshold | 65 |
Long Exit Conditions
| Setting | Value |
|---|---|
| Required | MACD · macdLine_below_signalLine |
| Stop Loss | 4% (REL) |
| Take Profit | 8% (REL) |
Short Entry Conditions
| Group | Indicator | Signal | Threshold |
|---|---|---|---|
| Required | MACD | macdLine_below_signalLine | — |
| Required | RSI | rsi_above_threshold | 35 |
Short Exit Conditions
| Setting | Value |
|---|---|
| Required | MACD · macdLine_above_signalLine |
| Stop Loss | 4% (REL) |
| Take Profit | 8% (REL) |
Recommended Parameters
| Indicator | Parameter | Value | Notes |
|---|---|---|---|
| MACD | Fast/Slow/Signal | 12/26/9 | Standard |
| RSI | Period | 14 | Standard |
Strategy 3: MACD + EMA Trend
Overview
Only take MACD crossovers in the direction confirmed by EMA trend.
When This Works Best
- Trending markets
- 4H to 1D timeframes
Algorithm Configuration
| Setting | Value |
|---|---|
| Type | BOTH |
| Position Size | 40% of equity (REL) |
| Order Type | MARKET |
| Timeout | COOLDOWN_ONLY, 5 bars |
Long Entry Conditions
| Group | Indicator | Signal | Threshold |
|---|---|---|---|
| Required | MACD | macdLine_above_signalLine | — |
| Required | EMA | price_above_ema | — |
Long Exit Conditions
| Setting | Value |
|---|---|
| Required | EMA · price_below_ema |
| Stop Loss | 5% (REL) |
| Take Profit | 10% (REL) |
Short Entry Conditions
| Group | Indicator | Signal | Threshold |
|---|---|---|---|
| Required | MACD | macdLine_below_signalLine | — |
| Required | EMA | price_below_ema | — |
Short Exit Conditions
| Setting | Value |
|---|---|
| Required | EMA · price_above_ema |
| Stop Loss | 5% (REL) |
| Take Profit | 10% (REL) |
Recommended Parameters
| Indicator | Parameter | Value | Notes |
|---|---|---|---|
| MACD | Fast/Slow/Signal | 12/26/9 | Standard |
| EMA | Period | 20 bars | Direction |
Backtesting Recommendations
Section titled “Backtesting Recommendations”- Test MACD periods: 8/21/5 vs 12/26/9 for different responsiveness
- Compare MACD vs PPO: PPO normalizes by price — better for cross-asset comparison