EMA Trend Filters Combined with MACD Signals: Rules and Implementation Caveats
Summary
The described method uses an EMA as a directional filter and MACD-related values to time entries: prices above the EMA are associated with long trades, while prices below it are associated with shorts. The narrative presents this as requiring both a price crossing and a MACD line crossover. However, the included implementation does not match that description: it calculates MACD from the fast EMA and a smoothed signal line, then enters based on the sign and thresholds of their difference, without testing crossovers. The stated slow-length input is also not used in that calculation.
The document gives default lengths and a one-year BTC futures backtest configuration, but no performance results. It notes sensitivity to parameter choices and trend reversals, and recommends stops and additional filters. The code also provides no explicit exit or stop-loss rules, and its threshold conditions may produce entries that differ from the prose description. These discrepancies mean the strategy should be understood as an incompletely specified example rather than evidence of a validated crossover system.
Key ideas
- The stated approach uses an EMA to define direction and MACD behavior to time entries.
- The implementation uses the fast EMA and its smoothed value, while the declared slow length is unused.
- Entry conditions test EMA position and MACD-difference thresholds rather than the crossovers described in the prose.
- The example provides no explicit exit or stop-loss rules and reports no backtest performance results.
- Parameter sensitivity and trend reversals are noted risks, while proposed filters and stops are not tested here.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.