Premium / Discount ZonesPremium and Discount Zones
This indicator visualizes Premium, Discount, and Equilibrium areas based on a rolling price range calculated from the highest high and lowest low over a user-defined lookback period.
The script is designed as a chart-structuring tool. Its purpose is to help traders see where current price is positioned inside a recent range, using three simple zones:
- Premium zone: upper part of the range
- Discount zone: lower part of the range
- Equilibrium zone: middle area of the range
What the script does
The indicator continuously measures the highest high and lowest low over the selected Range Length. Once that range is established, it divides the full range into three visually distinct areas:
- Premium
- Equilibrium
- Discount
These zones are then drawn directly on the chart as dynamic boxes that update as the rolling range changes.
How it works
1. Range calculation
The script looks back over the selected number of bars and finds:
- the highest high of the range
- the lowest low of the range
These two values define the active trading range used by the indicator.
2. Premium zone
The Premium zone is calculated near the top of the range. It represents the upper pricing area relative to the current measured range.
3. Discount zone
The Discount zone is calculated near the bottom of the range. It represents the lower pricing area relative to the same measured range.
4. Equilibrium zone
The Equilibrium zone is plotted around the midpoint of the range. Instead of using only a single middle line, the script creates a narrow middle band to make the equilibrium area easier to visualize on the chart.
5. Dynamic updates
As new candles form, the highest and lowest values of the selected rolling window may change. When that happens, the boxes are deleted and redrawn so that the zones always reflect the most recent active range.
Why this script can be useful
This script can help traders organize chart context by showing whether price is trading in the upper, middle, or lower section of a recent range.
Possible use cases include:
- identifying whether price is extended toward the top of a recent range,
- identifying whether price is trading at relatively lower range levels,
- visualizing a midpoint area for balance or reversion analysis,
- combining the zones with a separate market structure, trend, liquidity, or confirmation model.
The script does not generate direct buy or sell signals by itself. It is intended as a visual framework for price location within a defined range.
Inputs
- Range Length (bars):
Defines how many bars are used to build the rolling high-low range.
- Style:
Allows switching between Colored and Monochrome display modes.
- Premium Color:
Sets the box color for the Premium area in colored mode.
- Equilibrium Color:
Sets the box color for the Equilibrium area in colored mode.
- Discount Color:
Sets the box color for the Discount area in colored mode.
- Show Labels:
Shows or hides the Premium, Discount, and Equilibrium labels on the chart.
Visual logic
- Premium is displayed at the upper section of the active range.
- Discount is displayed at the lower section of the active range.
- Equilibrium is displayed around the center of the range.
- The zones extend across the currently measured lookback window.
How to use it
- Increase Range Length if you want wider and slower-moving zones.
- Decrease Range Length if you want the zones to react faster to recent price changes.
- Use Colored mode for stronger visual separation.
- Use Monochrome mode for a cleaner chart appearance.
- Combine the zones with your own analysis method if you want entry confirmation.
Notes
- This script is range-based, not prediction-based.
- The zones are recalculated from the recent rolling high-low structure.
- Because the range is dynamic, the boxes can shift when new highs or lows appear inside the selected lookback period.
- This tool is intended for chart analysis and visual reference.
Pine Script®指標

