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 de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.