Indicators··5 min read

Premium and Discount Zones from Rolling Range Midpoint

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

This indicator divides price action into premium and discount zones by calculating a rolling window's midpoint (the average of the highest high and lowest low) and shading the space above and below it. The zones help identify whether price is trading at a premium (above equilibrium) or discount (below equilibrium) relative to recent volatility. Mean-reversion traders, scalpers, and swing traders use it to contextualize price within the recent range and to spot equilibrium rejection.

//@version=6
indicator("Premium and Discount Zones", overlay=true)

// Inputs
length = input.int(20, title="Rolling Window Length", minval=1)
colorPremium = input.color(color.new(color.lime, 80), title="Premium Zone Color")
colorDiscount = input.color(color.new(color.red, 80), title="Discount Zone Color")

// Calculate rolling range
highest = ta.highest(high, length)
lowest = ta.lowest(low, length)

// Calculate midpoint
midpoint = (highest + lowest) / 2

// Plot for fill regions
pHigh = plot(highest, display=display.none)
pMid = plot(midpoint, display=display.none)
pLow = plot(lowest, display=display.none)

// Fill zones
fill(pMid, pHigh, color=colorPremium, title="Premium Zone")
fill(pLow, pMid, color=colorDiscount, title="Discount Zone")

// Visible midpoint line
plot(midpoint, title="Midpoint", color=color.gray, linewidth=1)

How the code works

On each bar, the script looks back over a user-defined number of prior bars (the rolling window, default 20). It identifies the highest high and lowest low within that window using ta.highest() and ta.lowest(). The midpoint is their arithmetic mean: (high + low) / 2. Three invisible plots are created for the highest, lowest, and midpoint values. The fill() function shades the space between midpoint and highest as premium (default light green) and the space between lowest and midpoint as discount (default light red). A visible gray line plots the midpoint itself for reference. All calculations are purely backward-looking; no future bars are examined, so the indicator does not repaint.

Reading it on a chart

When the price bar closes in the premium zone (above the gray midpoint line), price is bidding higher relative to the recent range equilibrium. Sustained premium closes often accompany accumulation phases. When price closes in the discount zone (below the midpoint), it signals relative withdrawal or defensive positioning. The width of the shaded band changes with volatility: a wide band indicates high recent volatility and a wide range; a narrow band shows consolidation. The midpoint line itself acts as a dynamic support or resistance reference. Mean-reversion traders watch for price that overshoots far into premium, then rejects and returns to the midpoint, as a potential entry for short-term reversals. Conversely, sharp dips into discount that quickly revert suggest dip-buying interest. The indicator is most effective in ranging markets where price oscillates around equilibrium; in strong directional moves, one zone dominates and the zones become less informative.

Limitations

The indicator makes no distinction between trending and ranging market regimes. During a strong uptrend, price naturally spends most time in the premium zone, rendering the discount zone a rare event. Traders may misinterpret prolonged premium as a signal when it is simply a structural feature of the trend. Similarly, in a downtrend, discount dominates. The rolling window is symmetric and unweighted: each bar in the window contributes equally, so a high or low from 20 bars ago has the same influence as one from the current bar. For markets where recent volatility matters more than older volatility, a weighted or exponential moving average may better capture equilibrium. The indicator is backward-looking and offers no predictive value for future breakouts or range expansion; it describes current price relative to recent range, not where price is likely to move. The midpoint is meaningful only if market participants price equilibrium at the arithmetic mean of highs and lows; in thin markets, news events, or during volatility regime shifts, this assumption can fail rapidly, and the zones may offer false comfort. Finally, the indicator produces no signals of its own and requires manual interpretation; traders must decide what constitutes a tradeable setup (e.g., how many bars in premium before shorting, or how deep into discount before covering). Without a coherent entry and exit rule, the zones alone do not constitute a trading method.

Key definitions

Rolling window: A fixed-length lookback period that shifts forward one bar at a time, dropping the oldest bar and adding the newest. Midpoint: The arithmetic mean of the highest high and lowest low within the rolling window, representing the equilibrium price between recent extremes. Premium zone: Price territory above the midpoint, typically associated with strength or accumulation within the recent range. Discount zone: Price territory below the midpoint, typically associated with weakness or defensive positioning. Repainting: A calculation that changes based on future bars; this indicator does not repaint because all inputs are historical.

References


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-08. 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.