Skip to content
All library documents

EMA Crossover Signals Filtered by MACD and EMA Slope

Article TradingView scripts

Summary

This strategy combines 9- and 21-period exponential moving average crossovers with MACD confirmation and slope filters. A signal is allowed for a limited number of bars after a crossover, provided both EMA angles pass directional thresholds and MACD agrees. A low-angle zone suppresses signals when both averages appear relatively flat. The settings include a scalp mode that reduces the angle requirements, plus a configurable crossover window.

Entries use recent lows or highs for stop placement and set a target using a configurable risk-to-reward multiple. The script also plots signal labels, a combined angle-strength measure, a dashboard, and alert conditions. It provides no reported performance results or market-specific validation. Its angle is calculated from price change per bar and converted with arctangent, so its values depend on the instrument’s price scale and timeframe; the preset thresholds may not transfer reliably across markets.

Key ideas

  • Long and short signals require a recent EMA crossover, directional EMA slopes, and matching MACD alignment.
  • The crossover is eligible only for a configurable number of subsequent bars.
  • A low-slope zone filters signals when both EMA angles are small.
  • Stops use recent price extremes, while targets apply a configurable risk-to-reward multiple.
  • The displayed angle thresholds depend on price units and timeframe, which limits portability.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.