OPEN-SOURCE SCRIPT
Reference Zones

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.
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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.