All indicators

EMA+MACD

Sep 5, 2021

Static chart image
SignalsOscillatorsMoving Averages

The EMA+MACD indicator tool is a trend-following system that combines Exponential Moving Average (EMA) crossovers with MACD momentum filtering to identify high-probability entry points.

Usage

The indicator can be used to identify trend reversals and momentum shifts by requiring agreement between two different technical components.

  • Long Signals: A "BUY" label appears when the shorter-period EMA (default 25) crosses above the longer-period EMA (default 50) while the MACD line is above zero. This indicates a bullish trend shift supported by positive momentum.
  • Short Signals: A "SELL" label appears when the longer-period EMA (default 50) crosses above the shorter-period EMA (default 25) while the MACD line is below zero. This indicates a bearish trend shift supported by negative momentum.

Users can apply this script to various timeframes to filter out noise, using the MACD condition as a confirmation filter for the primary EMA crossover signals.

Details

The script calculates two EMAs based on user-defined lengths to determine the primary trend direction. Simultaneously, it calculates a standard MACD (Moving Average Convergence Divergence) oscillator.

By requiring the MACD line to be above zero for longs and below zero for shorts, the strategy ensures that the crossover is occurring in the direction of broader momentum, potentially reducing false signals that occur in range-bound or choppy market conditions. The implementation allows for flexibility by letting users choose between SMA or EMA for both the oscillator and the signal line components.

Settings

MACD Settings

  • Fast Length: The period for the fast moving average used in the MACD calculation.
  • Slow Length: The period for the slow moving average used in the MACD calculation.
  • Source: The price data point used for all calculations (default is close).
  • Signal Smoothing: The period used to calculate the MACD signal line.
  • Oscillator MA Type: Selects between SMA or EMA for the calculation of the MACD oscillator.
  • Signal Line MA Type: Selects between SMA or EMA for the calculation of the signal line.

EMA Settings

  • Len Ema 1: The period for the first (shorter) Exponential Moving Average.
  • Len Ema 2: The period for the second (longer) Exponential Moving Average.

FAQ

How do I use the EMA+MACD signals?

The script generates visual labels on the chart ("BUY" and "SELL") whenever the EMA crossover conditions and MACD momentum filter are both met simultaneously.

Can I change the moving average types?

Yes, within the settings, you can toggle the MACD components between Simple Moving Averages (SMA) and Exponential Moving Averages (EMA) to suit your preference.

How do I access EMA+MACD?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.