OPEN-SOURCE SCRIPT
CandelaCharts - Breadth Divergence

📝 Overview
The CandelaCharts - Breadth Divergence indicator identifies structural divergences between the primary chart's price action and a secondary breadth or macroeconomic symbol (such as
VALUG (Value Line Geometric Index), AADD (Advance-Decline Issues), or
US10Y (Treasury Yields)).
Because you can plug any custom ticker into the indicator, it functions perfectly as an inter-market or macro divergence tool. By analyzing pivot highs and lows, it detects when the underlying market breadth or macro environment fails to confirm the price movement, signaling potential market reversals.
📦 Features
📈 Supported Assets & Timeframes
This indicator is universally compatible with any asset class (Equities, Crypto, Forex, Commodities, Indices) and any timeframe. To adapt the indicator to a different market, you only need to change a single input: the Breadth Symbol. For example:
⚙️ Settings
⚡️ Showcase
🚨 Alerts
This indicator features built-in alerts using the `alert()` function. You can create an alert on the indicator to be notified whenever a Bullish or Bearish Breadth Divergence is detected.
⚠️ Disclaimer
Trading involves significant risk, and many participants may incur losses. The content on this site is not intended as financial advice and should not be interpreted as such. Decisions to buy, sell, hold, or trade securities, commodities, or other financial instruments carry inherent risks and are best made with guidance from qualified financial professionals. Past performance is not indicative of future results.
The CandelaCharts - Breadth Divergence indicator identifies structural divergences between the primary chart's price action and a secondary breadth or macroeconomic symbol (such as
Because you can plug any custom ticker into the indicator, it functions perfectly as an inter-market or macro divergence tool. By analyzing pivot highs and lows, it detects when the underlying market breadth or macro environment fails to confirm the price movement, signaling potential market reversals.
- Bearish Divergence: Occurs when the main chart makes a Higher High while the breadth/macro symbol makes a Lower High.
- Bullish Divergence: Occurs when the main chart makes a Lower Low while the breadth/macro symbol makes a Higher Low.
📦 Features
- Automated Divergence Detection: Accurately maps regular bullish and bearish divergences using customizable pivot points.
- Customizable Breadth Symbol: Set any symbol to act as the breadth index to measure internal market strength.
- Visual Clarity: Highlights divergence zones with clean lines connecting the pivots and shaded background boxes for easy identification.
- Flexible Lookbacks: Complete control over pivot lookback lengths to adapt the sensitivity to any timeframe or volatility condition.
📈 Supported Assets & Timeframes
This indicator is universally compatible with any asset class (Equities, Crypto, Forex, Commodities, Indices) and any timeframe. To adapt the indicator to a different market, you only need to change a single input: the Breadth Symbol. For example:
- S&P 500 (
SPY,
ES1!): Set the Breadth Symbol to AADD (Advance-Decline), VVOLD (Up/Down Volume),
RSP (Equal Weight), or
VALUG (Value Line).
- Nasdaq 100 (
QQQ,
NQ1!): Set the Breadth Symbol to AADDQ (Nasdaq Advance-Decline), VVOLDQ,
QQQE (Equal Weight), or
VXN (Nasdaq Volatility).
- Forex / Currencies (e.g.
EURUSD,
GBPUSD): Set the Breadth Symbol to
DXY (US Dollar Index) or
US10Y (US 10-Year Treasury Yield).
- Crypto (
BTCUSD): Set the Breadth Symbol to
TOTAL3 (Altcoin Market Cap) or
BTC.D (Bitcoin Dominance).
⚙️ Settings
- Breadth Symbol: The ticker used to compare against the main chart (Default:
VALUG - Value Line Geometric Index).
- Pivot Left / Right: The number of bars required to the left and right to confirm a pivot high or low.
- Bullish / Bearish Colors: Customize the color of the divergence lines and background boxes. The backgrounds automatically apply a 90% opacity to the chosen colors.
⚡️ Showcase
- S&P 500 (
ES1!) vs.
VALUG: Show a bullish divergence where ES makes a lower low but the Value Line Geometric Index makes a higher low.
- Nasdaq 100 (
NQ1!) vs. AADDQ: Highlight a scenario where the cap-weighted NQ pushes higher but the Nasdaq Advance-Decline diverges, signaling weakness in the broader tech sector.
- Ethereum (
ETHUSD) vs.
TOTAL3: Show a bearish divergence where Ethereum makes a higher high, but the broader Altcoin market cap fails to follow suit.
- Euro (
EURUSD) vs.
DXY: Display an inverse divergence setup using the US Dollar Index.
🚨 Alerts
This indicator features built-in alerts using the `alert()` function. You can create an alert on the indicator to be notified whenever a Bullish or Bearish Breadth Divergence is detected.
⚠️ Disclaimer
Trading involves significant risk, and many participants may incur losses. The content on this site is not intended as financial advice and should not be interpreted as such. Decisions to buy, sell, hold, or trade securities, commodities, or other financial instruments carry inherent risks and are best made with guidance from qualified financial professionals. Past performance is not indicative of future results.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
🔵 Tools that give you the edge: candelacharts.com/.
🔵 Join our free discord for updates: candelacharts.com/community
🔵 Join our free discord for updates: candelacharts.com/community
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
🔵 Tools that give you the edge: candelacharts.com/.
🔵 Join our free discord for updates: candelacharts.com/community
🔵 Join our free discord for updates: candelacharts.com/community
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。