OPEN-SOURCE SCRIPT
HTF Candle Box

HTF Candle Box
Wraps every higher-timeframe (HTF) period into a single box drawn directly on your current chart - a way to see the weekly (or monthly, or any coarser) range and direction without leaving your intraday or daily view.
What it draws
Each box spans one HTF period:
- Top / bottom track that period's running high and low, growing live bar by bar as the period develops.
- Fill color reflects direction, like a candle: bullish (close at/above the period's open) or bearish (close below it) - using your two chosen colors. The still-forming box updates its color live too, so it can flip as price crosses back over the period's open, settling once the period actually closes.
- Border is optional - off by default, toggle it on and set its own color, style (solid/dashed/dotted), and width.
Settings
- Higher Timeframe - any timeframe coarser than your chart's own (defaults to Weekly). The indicator automatically skips itself if your chart is already at or coarser than the chosen HTF, since there'd be nothing meaningful to group.
- Bull / Bear Color - one row, two swatches. Each color's own opacity slider (in the picker itself) controls fill strength - no separate transparency setting needed.
- Show Border / Border Color / Border Style / Border Width - fully optional outline layer.
Use it for
Keeping higher-timeframe structure (this week's range so far, last week's completed range, etc.) visible while trading a lower timeframe, without switching charts or adding a second pane.
Wraps every higher-timeframe (HTF) period into a single box drawn directly on your current chart - a way to see the weekly (or monthly, or any coarser) range and direction without leaving your intraday or daily view.
What it draws
Each box spans one HTF period:
- Top / bottom track that period's running high and low, growing live bar by bar as the period develops.
- Fill color reflects direction, like a candle: bullish (close at/above the period's open) or bearish (close below it) - using your two chosen colors. The still-forming box updates its color live too, so it can flip as price crosses back over the period's open, settling once the period actually closes.
- Border is optional - off by default, toggle it on and set its own color, style (solid/dashed/dotted), and width.
Settings
- Higher Timeframe - any timeframe coarser than your chart's own (defaults to Weekly). The indicator automatically skips itself if your chart is already at or coarser than the chosen HTF, since there'd be nothing meaningful to group.
- Bull / Bear Color - one row, two swatches. Each color's own opacity slider (in the picker itself) controls fill strength - no separate transparency setting needed.
- Show Border / Border Color / Border Style / Border Width - fully optional outline layer.
Use it for
Keeping higher-timeframe structure (this week's range so far, last week's completed range, etc.) visible while trading a lower timeframe, without switching charts or adding a second pane.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。