All indicators

MACD ADX

Oct 27, 2020

Static chart image
SignalsOscillatorsMoving Averages

The MACD ADX indicator combines momentum and trend strength analysis to identify high-probability trend reversal and continuation signals directly on the chart. By filtering Moving Average Convergence Divergence (MACD) crossovers with Average Directional Index (ADX) thresholds, this tool aims to highlight entries only when sufficient trend strength is present.

Usage

The MACD ADX is used to identify bullish and bearish entries based on the convergence of trend direction and momentum.

  • Bullish Signals: A "Buy" label appears when the MACD line crosses above the Signal line (while below the zero line) and the ADX value is above 25, indicating a strengthening bullish recovery.
  • Bearish Signals: A "Sell" label appears when the MACD line crosses below the Signal line (while above the zero line) and the ADX value is above 25, indicating a strengthening bearish reversal.

Traders can use these signals to confirm entries in trending markets while avoiding the "choppy" signals often produced by MACD during low-volatility periods.

Details

This script integrates two classic technical analysis concepts:

  1. MACD (Moving Average Convergence Divergence): Used to detect changes in the strength, direction, momentum, and duration of a trend. This implementation specifically looks for crossovers occurring on the "oversold" or "overbought" sides of the zero line.
  2. ADX (Average Directional Index): Used to quantify trend strength. The script calculates the Directional Movement (DI+ and DI-) to derive the ADX. A hardcoded threshold of 25 is used to ensure that signals only trigger when a trend is non-random and gaining momentum.

Settings

  • Fast Length: The period for the shorter Exponential Moving Average (EMA) used in MACD calculation.
  • Slow Length: The period for the longer Exponential Moving Average (EMA) used in MACD calculation.
  • Source: The price data point used for calculations (default is Close).
  • Signal Smoothing: The EMA period used to smooth the MACD line to create the Signal line.
  • ADX Smoothing: The period used for smoothing the final ADX value.
  • DI Length: The period used for calculating the Directional Movement components (DI+ and DI-).

FAQ

How do I interpret the signals?

A signal is generated when a MACD crossover occurs and the trend strength (ADX) is above 25. "Buy" signals suggest bullish momentum in a strengthening trend, while "Sell" signals suggest bearish momentum.

Can I change the trend strength threshold?

In this version, the threshold for trend strength is set to 25 within the script logic to ensure signals only appear during active trends. You can adjust the ADX and DI lengths in the settings to make the indicator more or less sensitive.

How can I access MACD ADX?

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.