OPEN-SOURCE SCRIPT
Advance-Decline Line

Advance-Decline Line — Market Breadth Indicator
The NYSE Advance-Decline Line measures the internal health of the broad market by tracking how many stocks are actually participating in any given move — not just the mega-caps driving the index.
Every session the NYSE reports how many stocks closed up (advances) vs. down (declines). This indicator plots the raw daily difference as a histogram and applies two EMAs to identify the underlying breadth trend, cutting through daily noise to reveal the true market regime.
Why price alone isn't enough
The S&P 500 is market-cap weighted. Apple, Microsoft, and Nvidia can hold the index up while the other 490 stocks quietly deteriorate. The A/D Line weights every stock equally — exposing that divergence immediately. The classic example: the NYSE A/D Line peaked nearly two years before the Nasdaq crashed in 2000, giving attentive traders ample warning.
Background color — the regime signal
🟢 Green — Fast EMA > Slow EMA AND Slow EMA > 0. Broad market breadth is healthy. Favorable conditions for long positions.
🟠 Orange — Mixed signals. One condition is met but not both. Breadth is transitioning — proceed with caution.
🔴 Red — Fast EMA < Slow EMA AND Slow EMA < 0. Breadth is weak across most stocks. Historically, breakouts fail at a much higher rate in this regime.
Histogram bars
Each bar shows the raw daily breadth pulse — teal when more stocks advanced, red when more declined. Individual bars provide context; the background color reflects the dominant trend via the two EMAs.
Settings
Fast EMA (default 50)
Slow EMA (default 200) — moves slowly, only reverses during genuine regime shifts
Alerts
Breadth Turning Bullish — Fast EMA crossed above Slow EMA
Breadth Turning Bearish — Fast EMA crossed below Slow EMA
Slow EMA Above Zero — breadth trend fully positive
Slow EMA Below Zero — breadth trend fully negative
The NYSE Advance-Decline Line measures the internal health of the broad market by tracking how many stocks are actually participating in any given move — not just the mega-caps driving the index.
Every session the NYSE reports how many stocks closed up (advances) vs. down (declines). This indicator plots the raw daily difference as a histogram and applies two EMAs to identify the underlying breadth trend, cutting through daily noise to reveal the true market regime.
Why price alone isn't enough
The S&P 500 is market-cap weighted. Apple, Microsoft, and Nvidia can hold the index up while the other 490 stocks quietly deteriorate. The A/D Line weights every stock equally — exposing that divergence immediately. The classic example: the NYSE A/D Line peaked nearly two years before the Nasdaq crashed in 2000, giving attentive traders ample warning.
Background color — the regime signal
🟢 Green — Fast EMA > Slow EMA AND Slow EMA > 0. Broad market breadth is healthy. Favorable conditions for long positions.
🟠 Orange — Mixed signals. One condition is met but not both. Breadth is transitioning — proceed with caution.
🔴 Red — Fast EMA < Slow EMA AND Slow EMA < 0. Breadth is weak across most stocks. Historically, breakouts fail at a much higher rate in this regime.
Histogram bars
Each bar shows the raw daily breadth pulse — teal when more stocks advanced, red when more declined. Individual bars provide context; the background color reflects the dominant trend via the two EMAs.
Settings
Fast EMA (default 50)
Slow EMA (default 200) — moves slowly, only reverses during genuine regime shifts
Alerts
Breadth Turning Bullish — Fast EMA crossed above Slow EMA
Breadth Turning Bearish — Fast EMA crossed below Slow EMA
Slow EMA Above Zero — breadth trend fully positive
Slow EMA Below Zero — breadth trend fully negative
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.