All indicators

Divergence of Market Breadth & Price deduction indicator

Oct 14, 2020

Static chart image
SignalsDivergencesMoving Averages

The Divergence of Market Breadth & Price deduction indicator tool provides a multi-faceted approach to analyzing market health and trend strength by comparing internal market breadth data and price-to-moving-average relationships. It aims to offer traders early warning signs of price reversals or trend exhaustion by identifying divergences between major indices and price-specific metrics.

Usage

The script offers three distinct operating modes that can be selected from the "Options" setting:

  1. Market Breadth Divergence (MB): Compares the percentage of stocks above their 20-period Simple Moving Average (SMA) for the Nasdaq 100 (NDTW) and the Russell 2000 (R2TW). This mode highlights the relative strength between tech-heavy and small-cap stocks, serving as a barometer for broad market participation.
  2. Price Divergence (PDI): Measures the distance between the current price and various Exponential Moving Averages (20, 60, and 120). This helps identify when a trend is overextended or losing momentum.
  3. Price Deduction (PDE): Uses a deduction method inspired by LEI and LoneCapital to calculate the percentage change of price relative to its historical values at 20, 60, and 120-bar offsets, providing a view of momentum and trend structure.

Details

The indicator relies on the concept that healthy market rallies are usually supported by broad participation (market breadth). When the Nasdaq 100 outpaces small-caps significantly, or when the price moves too far away from its long-term averages, a divergence occurs.

  • Market Breadth: Uses the ratio of (NDTW / R2TW) - 1 to find leadership shifts.
  • Price Divergence/Deduction: Uses normalized values to allow for comparison across different assets, looking at Short/Mid/Long-term relationships.
  • Smoothing: All modes include Hull Moving Averages (HMA) to smooth the data and provide clearer crossover signals for trend changes.

Settings

General Settings

  • Options: Selects the active mode (Market Breadth Divergence, Price Divergence, or Price Deduction).

Market Breadth Divergence

  • FAST MA Length: The period for the fast smoothing line (HMA).
  • SLOW MA Length: The period for the slow smoothing line (HMA).
  • Long term MA Length: The period for the long-term baseline.

Price Divergence

  • FAST MA Length: The period for the fast smoothing line applied to the Close/Short divergence.
  • SLOW MA Length: The period for the slow smoothing line.

Price Deduction

  • Price Deduction MA Length: The period for the smoothing lines applied to the 20, 60, and 120-period deduction lines.

FAQ

How do I access the Divergence of Market Breadth & Price deduction indicator?

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

What indices are used for market breadth?

The script specifically requests data for the Nasdaq 100 (NDTW) and Russell 2000 (R2TW) percentage of stocks above their 20 SMA.

Can I set alerts for crossovers?

Yes, the script includes built-in alert conditions for HMA crossovers within each of the three modes.

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.