MACD + EMA System with Alerts
Nov 2, 2022

The MACD + EMA System with Alerts indicator provides a trend-following momentum strategy by combining the Moving Average Convergence Divergence (MACD) with an Exponential Moving Average (EMA) filter to identify high-probability trade entries.
Usage
The indicator generates buy and sell signals based on the intersection of trend and momentum filters.
Long Signals A long entry is triggered when:
- The MACD line crosses above the Signal line.
- The crossover occurs while the MACD signal is below the zero (0) line, indicating potential momentum reversal from an oversold state.
- The price is trading above the EMA 200, ensuring the trade is aligned with the long-term uptrend.
Short Signals A short entry is triggered when:
- The MACD line crosses below the Signal line.
- The crossover occurs while the MACD signal is above the zero (0) line, indicating potential momentum reversal from an overbought state.
- The price is trading below the EMA 200, ensuring the trade is aligned with the long-term downtrend.
Details
The script enhances the standard MACD strategy by introducing a trend filter (EMA 200). Standard MACD crossovers in isolation can frequently produce false signals in sideways or counter-trend markets. By requiring the price to be on a specific side of the EMA, the system filters out signals that oppose the primary market direction. The inclusion of the "below/above zero" rule further ensures that entries are taken when momentum is shifting favorably within that primary trend.
Settings
- EMA Period: Sets the length of the Exponential Moving Average used for trend filtering (default is 200).
- Fast Length: Sets the period for the faster EMA in the MACD calculation.
- Slow Length: Sets the period for the slower EMA in the MACD calculation.
- Signal Length: Sets the smoothing period for the MACD Signal line.
FAQ
How do I access the MACD + EMA System with Alerts? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can I change the trend filter length? Yes, you can adjust the EMA Period in the settings to better suit different timeframes or trading styles, such as using a 50 EMA for a more aggressive trend filter.
Does this indicator include alerts? Yes, the script includes alert conditions for Buy and Sell signals, as well as standard MACD crossovers/crossunders, allowing for automated notifications.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.