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.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.