Indicators··6 min read

New High/New Low Breadth Indicator

4 references, link-verified · 1 primaryEditor of record: Shane CantyStandards review editorial standard · audit log

This indicator tracks how many symbols in a chosen basket are simultaneously at new highs or new lows over a configurable period. It measures market breadth, the extent to which multiple securities participate in a move, without requiring multiple chart windows. Traders use breadth indicators to confirm trend strength or spot divergences: when prices rise but fewer symbols hit new highs, it signals weakening participation and potential reversal risk. This version runs on four configurable tickers and plots both the raw counts and their difference.

//@version=6
indicator("New High/New Low Breadth", overlay=false, max_bars_back=2000)

// Basket configuration: four symbol inputs
symbol1 = input("SPY", "Basket Symbol 1")
symbol2 = input("QQQ", "Basket Symbol 2")
symbol3 = input("IWM", "Basket Symbol 3")
symbol4 = input("DIA", "Basket Symbol 4")

// Lookback period for new high/low detection
period = input(252, "Lookback Period (bars)", minval=5)

// Fetch closing price for each symbol
c1 = request.security(symbol1, timeframe.period, close)
c2 = request.security(symbol2, timeframe.period, close)
c3 = request.security(symbol3, timeframe.period, close)
c4 = request.security(symbol4, timeframe.period, close)

// Detect new highs: close equals highest close over the period
nh1 = c1 == ta.highest(c1, period)
nh2 = c2 == ta.highest(c2, period)
nh3 = c3 == ta.highest(c3, period)
nh4 = c4 == ta.highest(c4, period)

// Detect new lows: close equals lowest close over the period
nl1 = c1 == ta.lowest(c1, period)
nl2 = c2 == ta.lowest(c2, period)
nl3 = c3 == ta.lowest(c3, period)
nl4 = c4 == ta.lowest(c4, period)

// Count the number of symbols at new highs and new lows
countHighs = (nh1 ? 1 : 0) + (nh2 ? 1 : 0) + (nh3 ? 1 : 0) + (nh4 ? 1 : 0)
countLows = (nl1 ? 1 : 0) + (nl2 ? 1 : 0) + (nl3 ? 1 : 0) + (nl4 ? 1 : 0)

// Breadth line: new highs minus new lows
breadth = countHighs - countLows

// Plot the counts and their difference
plot(countHighs, "Count at New High", color.green, linewidth=2)
plot(countLows, "Count at New Low", color.red, linewidth=2)
plot(breadth, "Breadth (NH - NL)", color.blue, linewidth=2, style=plot.style_area)
hline(0, color=color.gray, linestyle=hline.style_dashed)

How the code works

The indicator fetches the closing price of four user-selected symbols using request.security(), which allows each symbol to be retrieved on the main chart's timeframe without leaving the current ticker. For each symbol, ta.highest() and ta.lowest() find the extreme prices over the lookback period (defaulted to 252 bars, roughly one trading year); a boolean flag is set to true when the current close matches either extreme. The four booleans for new highs are summed to produce a count from 0 to 4, and the same occurs for new lows. The breadth line subtracts new lows from new highs, yielding a range from −4 to +4. Green and red lines show raw counts; the blue area represents the net breadth. The zero line acts as a neutral reference: positive values favor highs, negative values favor lows.

Reading it on a chart

When the breadth line is positive and rising, it indicates increasingly synchronized strength across the basket: more symbols are hitting new peaks, suggesting broad participation in an uptrend. Conversely, a falling or negative breadth line during an overall price advance on the main chart warns of divergence: few symbols are at new highs, and some may be at new lows, implying the rally is narrow and vulnerable. A trader might use this to set tighter stops or reduce position size. In downtrends, negative breadth that widens suggests broad weakness. Sharp spikes in new lows (red line) often coincide with capitulation or panic selling, sometimes preceding bottoms, though timing entries on such reversals carries execution risk. The indicator works across any timeframe, daily, weekly, intraday, and the basket symbols can be adjusted to focus on specific sectors (e.g., tech mega-caps, small caps, bond ETFs) depending on the trader's thesis.

Limitations

This indicator has several material blind spots. First, new highs and new lows are binary events: a symbol is either at a 52-week high or not, with no gradation for how close it is; a symbol 2% below its high registers the same as one 20% below. This discreteness can hide subtle erosion in strength. Second, the four-symbol basket is arbitrary; the choice of SPY, QQQ, IWM, and DIA does not represent the full market, and different baskets will produce different signals. A concentrated basket of highly correlated names (e.g., mega-cap tech) will not capture the breadth of the broader market or less-followed sectors. Third, in low-volatility periods, symbols may linger at or near recent highs for weeks without fresh momentum, inflating perceived strength. Fourth, the indicator offers no signal for optimal entry or exit; a positive breadth reading does not time turns and does not distinguish between early-stage moves and exhaustion. Fifth, request.security() may fail silently or return stale data if a symbol is delisted or if data connectivity is interrupted. Finally, the indicator is backward-looking: by definition, it signals after new highs or lows have already occurred, not before, and offers no lead-time advantage in mean-reversion or momentum regimes.

Key definitions

Breadth: The number or proportion of securities participating in a price move; high breadth indicates many securities moving together (strong trend), low breadth indicates few securities moving (weak or narrow trend).

New high: A price level that is the highest closing price for a security over a specified lookback period, often used to gauge strength and bullish momentum.

New low: A price level that is the lowest closing price for a security over a specified lookback period, often used to gauge weakness and bearish momentum.

Divergence: A situation in which price rises but confirming indicators (such as breadth, volume, or momentum) fail to rise together, warning of weakening trend conviction.

Lookback period: The number of historical bars (candles) examined to calculate highs, lows, or other metrics; common periods are 52 weeks (≈252 trading days) or 20/50/200-day moving averages.

Request.security(): A Pine Script function that fetches OHLCV data (open, high, low, close, volume) for a symbol other than the current chart symbol, allowing multi-symbol analysis on a single chart.

References

  1. Murphy, John J., "Technical Analysis of the Financial Markets", Prentice Hall (1999). Covers breadth theory and its role in confirming trends.

  2. Investopedia, "Breadth of Market", https://www.investopedia.com/terms/b/breadthofsiduation.asp. Educational overview of breadth as a market confirmation tool.

  3. TradingView, "Pine Script Reference Manual, ta.highest(), ta.lowest()", https://www.tradingview.com/pine-script-reference/. Documentation for the functions used to calculate new highs and lows.

  4. CME Group, "Market Data Guides", https://www.cmegroup.com/. Reference for multi-security basket tracking in derivatives markets.

  5. Wikipedia, "Advance-Decline Line", https://en.wikipedia.org/wiki/Advance%E2%80%93decline_line. Covers the mechanics of breadth indicators and their historical use in technical analysis.


Educational research on historical data only. Not investment advice, not a signal, and never a performance promise. Past results do not predict future performance. Every reference is link-verified before publication and every paper is re-audited weekly against the library's editorial standard.

Last reviewed by the PropLedger research pipeline: 2026-10-04. Educational research on historical data, not financial advice.

Educational research on historical data only. Not investment advice, not a signal, and never a performance promise. Past results do not predict future performance. Every reference is link-verified before publication and every paper is re-audited weekly against the library's editorial standard. Found an error? Email support@prop-ledger.org and the paper is corrected or withdrawn.