Indicators··5 min read

Premium and Discount Zones

0 references, link-verifiedEditor of record: Shane CantyStandards review editorial standard · audit log

Premium and discount zones derived from a rolling range midpoint help traders identify where price is trading relative to the typical range over a recent period. Price above the midpoint occupies the premium zone; price below occupies the discount zone. Traders often observe mean-reversion behavior within these zones or use them to contextualize overbought and oversold conditions during range-bound trading.

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

// Inputs
lookback = input.int(20, title="Lookback Period", minval=1)
showRangeLines = input.bool(true, title="Show Range Boundaries")
showMidline = input.bool(true, title="Show Midpoint")
premiumColor = input.color(color.new(color.green, 80), title="Premium Zone Color")
discountColor = input.color(color.new(color.red, 80), title="Discount Zone Color")

// Calculate rolling range
rangeHigh = ta.highest(high, lookback)
rangeLow = ta.lowest(low, lookback)
midpoint = (rangeHigh + rangeLow) / 2

// Plot midpoint
plot(showMidline ? midpoint : na, title="Midpoint", color=color.gray, linewidth=2, style=plot.style_dashed)

// Plot range boundaries
plot(showRangeLines ? rangeHigh : na, title="Range High", color=color.new(color.gray, 60), linewidth=1)
plot(showRangeLines ? rangeLow : na, title="Range Low", color=color.new(color.gray, 60), linewidth=1)

// Shade zones
h_fill = plot(rangeHigh)
m_fill = plot(midpoint)
l_fill = plot(rangeLow)

fill(m_fill, h_fill, color=premiumColor, title="Premium Zone")
fill(l_fill, m_fill, color=discountColor, title="Discount Zone")

How the code works

The indicator calculates the highest and lowest prices over a lookback period (default 20 bars) using Pine's built-in ta.highest() and ta.lowest() functions. It then computes the midpoint as the average of these two extremes. The range boundaries and midpoint are plotted as lines, and the space between the midpoint and each boundary is filled with a semi-transparent color to create the premium (above) and discount (below) zones. The fill is achieved by plotting the boundaries, then using the fill() function to shade the regions between them. All inputs are configurable so traders can adjust the lookback period, toggle visibility, and customize zone colors.

Reading it on a chart

When the indicator is applied to a chart, the midpoint appears as a dashed gray line. The area above it is shaded (green by default) as the premium zone; the area below is shaded (red by default) as the discount zone. The range boundaries (high and low) can be toggled on or off. Traders typically watch for:

  • Price reaching or exceeding the range boundary: a signal that price has moved to an extreme within the recent rolling window.
  • Price approaching the midpoint from either side: a potential mean-reversion signal or level of support/resistance.
  • Sustained trading in the premium zone: suggests strength and upward momentum relative to the period's mid-level.
  • Sustained trading in the discount zone: suggests weakness and downward momentum.
  • Lookback period adjustment: shorter periods (e.g., 10 bars) create tighter, more reactive zones; longer periods (e.g., 50 bars) create wider, smoother zones that lag price slightly.

The zones themselves do not predict reversals; they contextualize price location and can complement other indicators to confirm support, resistance, or overbought/oversold conditions.

Limitations

The rolling range approach has several important shortcomings. First, it is reactive, not predictive: it reflects recent price action but offers no signal of future direction. Price can remain in the premium zone for extended periods during strong uptrends, making the zones unreliable as standalone reversal signals. Second, the indicator is lag-dependent: it always includes the current bar's price in the range calculation, so the boundaries shift with every new bar; this creates "trailing" behavior rather than fixed support/resistance levels. Third, lookback period selection is arbitrary: there is no universal optimal period, and changing it materially alters the visual picture. Fourth, the zones are statistically uninformed: they do not account for volatility, volume distribution, or market regime; a zone that appears wide during low volatility may be unexpectedly tight when volatility spikes. Fifth, the indicator offers no entry or exit signal logic; traders must supply their own rules for when to trade the zones, and those rules are not provided. Finally, the indicator repaints: as each bar closes and new data arrives, the range high and low can shift, causing the zones to redraw. This is unavoidable with a rolling range and makes the indicator unsuitable for strategy backtesting or live order entry without additional safeguards.

Key definitions

Rolling range: the highest high and lowest low price over a fixed, sliding window of recent bars.

Midpoint: the arithmetic mean of the rolling range's high and low, representing the center of recent price action.

Premium zone: the price region above the midpoint, where price is trading higher than the recent mid-level.

Discount zone: the price region below the midpoint, where price is trading lower than the recent mid-level.

Mean reversion: the tendency of price to move back toward a central tendency (such as a midpoint or average) after moving to an extreme.

Repainting: the behavior of an indicator redrawing past values as new bars arrive or bar status changes, invalidating historical signals.

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-09-06. 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.