OPEN-SOURCE SCRIPT

Reference Zones

483
Reference Range Zones maps an anchor period's trading range into colored horizontal zones, so you can read at a glance where current price sits relative to the prior session's premium, value, and discount areas.
What it does

It takes the high and low of a chosen anchor timeframe (the previous day by default), divides that range into equal horizontal zones, and draws each zone as a band of dotted lines. The top zones are colored as premium (potential resistance / distribution), the middle zones as value, and the bottom zones as discount (potential support / accumulation). A configurable number of past periods stay on the chart as history.
How it works

On each new anchor period the script captures the just-completed period's high and low, then splits that range into N equal slices. For each slice it renders a band of evenly spaced lines, where the "fill %" input controls how much of the slice height the band occupies — lower values leave visible gaps between bands. Zone color is assigned by position: a settable number of top slices use the premium color, a settable number of bottom slices use the discount color, and everything between uses the value color. Optional price labels mark each zone boundary at the right edge. Completed periods are frozen in place and the oldest are pruned once the kept-history limit is reached. A built-in line budget automatically reduces how many history periods are drawn if your zone and density settings would exceed the platform's drawing limit, so the script stays within limits without manual tuning.
How to use it

Treat the discount band as an area where longs are at a relative range low and the premium band as an area where shorts are at a relative range high; the value band in the middle is where price is closer to equilibrium. The zones are reference context, not signals — combine them with your own structure, trend, or volume read. Use "Previous period" mode for fixed levels you can plan around at the open, or "Current (developing)" mode to watch zones expand with the live session.
Inputs

Anchor timeframe and range source (previous vs developing); number of history periods to keep; number of zones, and how many top/bottom zones are premium/discount; line style, width, density, and band fill %; right-edge projection toggle; edge price labels; and full color and transparency control.
Notes

No zones appear until at least one anchor period has completed (in "Previous period" mode). This is a visual range-context tool and makes no claim about future price direction or performance.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.