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.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.