MACD Crossover Strategy
MACD is the difference between a fast and a slow exponential moving average (12 and 26 days by default); the signal line is a 9-day average of MACD. The classic rule buys when MACD crosses above its signal line and sells when it crosses back below. A variant only takes buys while MACD is below zero, trying to catch an early turn from weakness.
Test this strategy in Radiant AIRules
- Buy at the next open when the MACD line closes above the signal line after being below it.
- Sell at the next open when MACD crosses back below the signal line.
- Optional: only buy while MACD is below zero; optional stop-loss and 200-day trend filter.
Parameters
| Parameter | Default | Range |
|---|---|---|
| Fast EMA | 12 | 2-250 |
| Slow EMA | 26 | 2-250 |
| Signal | 9 | 2-250 |
| Below-zero filter | off | on/off |
Risks
- MACD crossovers are frequent; in choppy markets many of them are small losses.
- It is a lagging indicator: it confirms moves rather than predicting them.
- Past results do not guarantee future results. A backtest is a simulation on historical prices, not a forecast.
- Costs matter: every trade pays commission and spread. Strategies with many short trades are hit hardest.
- Overfitting: if you keep tweaking the numbers until the curve looks great, you are fitting the past. Test the idea on other symbols and other years before trusting it.
Questions
- Is MACD a trend or a momentum indicator?
- Both: it is built from trend averages and measures the speed of their divergence.
- Should I change 12/26/9?
- Only if the change also holds on other symbols and years; otherwise it is curve fitting.
- Is this financial advice?
- No. Radiant AI is an educational tool that tests rules on historical data. It does not tell you what to buy and does not trade for you.