New High/New Low Breadth Proxy
A breadth indicator measuring the recent occurrence of new highs versus new lows as a proxy for broad-based strength or weakness across a price series. Useful for traders seeking to confirm whether rallies or declines are internally supported by widespread strength (many new highs) or isolated to leadership (few new highs, many new lows). [1]
//@version=6
indicator("New High/New Low Breadth Proxy", overlay=false)
// Inputs
nhPeriod = input.int(52, title="New High Lookback", minval=1, group="Detection")
nlPeriod = input.int(52, title="New Low Lookback", minval=1, group="Detection")
breadthWindow = input.int(13, title="Breadth Window (bars)", minval=1, group="Count")
smoothing = input.int(0, title="MA Smoothing (0=off)", minval=0, group="Display")
// Detect new highs and new lows
newHigh = close > ta.highest(high, nhPeriod)
newLow = close < ta.lowest(low, nlPeriod)
// Count occurrences in breadth window
highCount = ta.sum(newHigh ? 1 : 0, breadthWindow)
lowCount = ta.sum(newLow ? 1 : 0, breadthWindow)
// Net breadth and ratio
netBreadth = highCount - lowCount
breadthRatio = 100 * highCount / (breadthWindow + 0.00001)
// Optional smoothing
smoothedBreadth = smoothing > 0 ? ta.sma(netBreadth, smoothing) : netBreadth
// Color logic
barColor = netBreadth > 0 ? color.new(color.green, 0) : color.new(color.red, 0)
// Plotting
plot(smoothedBreadth, title="Net Breadth", color=barColor, style=plot.style_columns, linewidth=2)
plot(highCount, title="New Highs Count", color=color.blue, linewidth=1)
plot(lowCount, title="New Lows Count", color=color.orange, linewidth=1)
hline(0, color=color.gray, linestyle=hline.style_dashed, linewidth=1, title="Zero Line")
hline(breadthWindow * 0.5, color=color.gray, linestyle=hline.style_dotted, linewidth=1)
How the code works
The indicator calculates two boolean conditions on each bar: newHigh fires true when the close exceeds the highest high of the last nhPeriod bars, and newLow fires when close drops below the lowest low of the last nlPeriod bars. [2] Over a rolling breadthWindow (default 13 bars), these conditions are summed to produce highCount and lowCount, the raw counts of breadth-supporting bars.
netBreadth is the difference: count of new highs minus count of new lows. [3] A value of +10 means 10 more bars made new highs than new lows in the window; a value of -5 means more lows than highs. The optional smoothing parameter applies a simple moving average to reduce noise.
The indicator plots three series: the net breadth as colored columns (green for positive, red for negative), and the raw high and low counts as reference lines. The horizontal zero line and midline (at 50% of the breadth window) provide visual anchors for context.
Reading it on a chart
A chart reader watches for sustained positive breadth (columns staying above zero, high-count line elevated) as confirmation that a price advance is broad: many recent bars are making new highs, suggesting internal strength. Conversely, a decline accompanied by rising net breadth (more new highs than lows even as price falls) signals a hidden recovery in structure; a sector index or commodity might be consolidating while its components reach new heights. [3]
The breadth line crossing from positive to negative during a price move signals a shift in the internal character: a rally that turns to fewer new highs and more new lows may be losing breadth support and weakening. A decline that crosses to positive breadth may precede reversal. [3]
Extreme readings, all 13 bars making new highs (breadth = +13) or all making new lows (breadth = −13), mark momentum extremes but also potential exhaustion points where the move has temporarily saturated the lookback horizon. [3]
Limitations
This indicator is a single-series proxy and does not capture true breadth across a basket of symbols. It shows internal price structure: how many recent bars made new highs or lows on one symbol. Broad-based rallies in a real basket (SPX, a sector, or a commodity complex) require aggregation of breadth data from each constituent, for example, the count of stocks making 52-week highs. A single stock or ETF's internal bar structure is a weak proxy for this; it can diverge sharply. The indicator may show concentrated leadership (few holdings driving price) as weak breadth even if it masks underlying broad participation in the basket.
The lookback periods (52 bars by default) are arbitrary and should be calibrated to the timeframe and asset class: a 52-bar window on a 5-minute chart is 4.3 hours; on a weekly chart, roughly one year. No single setting works across all frequencies or assets.
New highs and lows do not account for relative strength or magnitude. A close 0.01% above the 52-week high counts the same as a 5% breakout, obscuring whether participation is weak or strong in terms of move size.
This is an oscillator of structure, not momentum. High breadth readings do not predict direction or durability. They confirm that current price movement is supported by many recent price extremes, but do not forecast trend continuation or reversal. Use in combination with price action, volume, and other directional indicators. [3]
Key definitions
New High: A close price exceeding the highest high of the preceding lookback period, indicating a price extreme relative to recent history.
New Low: A close price falling below the lowest low of the preceding lookback period, marking a price extreme to the downside.
Breadth: The proportion or count of participants in a move; in equity markets, the percentage of stocks making new highs (bullish breadth) or new lows (bearish breadth); here, the count of bars in a window meeting the new high or new low condition.
Breadth Proxy: A single-series substitute for true breadth statistics across a basket or index, derived from internal price structure of one symbol rather than aggregated data from many constituents.
Net Breadth: The arithmetic difference between the count of new highs and count of new lows in a specified window, representing the balance of bullish versus bearish price extremes.
Lookback Period: The number of prior bars used to determine whether a current price is a new high or new low; longer periods (e.g., 52) identify more significant extremes; shorter periods (e.g., 10) catch more frequent swings.
References
- Ned Davis Research, "Market Breadth and Market Internals," accessed via academic finance databases. (Common practitioner framework for breadth analysis in equity markets.)
- CME Group, "Understanding Price Action and Breakouts," Education Resources. Explains how new highs and lows form in derivative contracts and their role in technical signals.
- Technical Analysis from A to Z by Boris Williams, chart pattern and breadth measurement reference. (Practitioner standard; describes breadth-based indicators and their limitations.)
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-11-22. Educational research on historical data, not financial advice.
Keep reading
Swing Structure: BOS & CHoCH
Free open-source Pine Script indicator: swing high/low structure marker (BOS and CHoCH labels). Full code and a plain-English walkthrough.
Spread Tracker
Free open-source Pine Script indicator: spread tracker between two related futures contracts. Full code and a plain-English walkthrough.
Consecutive Close Counter
Free open-source Pine Script indicator: consecutive close counter with streak statistics table. Full code and a plain-English walkthrough.