OPEN-SOURCE SCRIPT
已更新 Prior Day Range Box

Prior Day Range Box
Prior Day Range Box plots the previous trading day’s high and low directly on the current chart and displays that range as a visual box with optional reference lines. The script pulls the prior day’s high and low from the daily timeframe, then projects those levels onto the active chart so traders can track how current price behaves around important higher-timeframe levels.
At the start of each new trading day, the indicator creates a new prior day range using the previous day’s high and low. A box can be drawn between those levels to clearly show the full prior day range, while separate horizontal lines mark the prior day high and prior day low. These levels are widely used by intraday traders as key areas for support, resistance, breakout confirmation, rejection, and liquidity interaction.
An optional midpoint line can also be displayed. This line marks the 50% level of the prior day’s range and can serve as an added reference for balance, mean reversion, or directional bias during the session.
The script also includes an optional historical lookback mode. When enabled, it can display prior day range levels from multiple past sessions, making it easier to study how price reacts to historical daily ranges over time. The number of displayed lookback days can be adjusted to fit the user’s preference.
All visual elements are customizable. Users can choose whether to show the range box, enable the midpoint, extend the prior day high and low across the chart, display historical lookback days, and adjust the colors and line width to match their chart setup.
This indicator is designed for traders who use prior day high and low levels as part of their intraday process and want a clean visual framework for tracking previous session range structure on any intraday chart.
Prior Day Range Box plots the previous trading day’s high and low directly on the current chart and displays that range as a visual box with optional reference lines. The script pulls the prior day’s high and low from the daily timeframe, then projects those levels onto the active chart so traders can track how current price behaves around important higher-timeframe levels.
At the start of each new trading day, the indicator creates a new prior day range using the previous day’s high and low. A box can be drawn between those levels to clearly show the full prior day range, while separate horizontal lines mark the prior day high and prior day low. These levels are widely used by intraday traders as key areas for support, resistance, breakout confirmation, rejection, and liquidity interaction.
An optional midpoint line can also be displayed. This line marks the 50% level of the prior day’s range and can serve as an added reference for balance, mean reversion, or directional bias during the session.
The script also includes an optional historical lookback mode. When enabled, it can display prior day range levels from multiple past sessions, making it easier to study how price reacts to historical daily ranges over time. The number of displayed lookback days can be adjusted to fit the user’s preference.
All visual elements are customizable. Users can choose whether to show the range box, enable the midpoint, extend the prior day high and low across the chart, display historical lookback days, and adjust the colors and line width to match their chart setup.
This indicator is designed for traders who use prior day high and low levels as part of their intraday process and want a clean visual framework for tracking previous session range structure on any intraday chart.
發行說明
Updated發行說明
Added Midline Style functionality.發行說明
Added internal line functionality.發行說明
Internal RTH logic updated.發行說明
Pine category updated.開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。