OPEN-SOURCE SCRIPT
Smooths HTF Mini Chart

Overview
The Smooths HTF Mini Chart is a technical utility designed for traders who require constant high-timeframe (HTF) context without sacrificing screen real estate or deal with the "drifting" issues associated with standard drawing objects. By leveraging the Pine Script Table API, this script creates a live candlestick "monitor" that is anchored to the UI layer of the chart, ensuring it stays perfectly positioned in the corner regardless of how a user drags or scales the primary price action.
The Technical Concept (Why it is Original)
Most HTF indicators overlay candles directly onto the main price chart. This presents two problems:
They clutter the primary timeframe's candles.
They are tied to bar indexes; when a user scrolls back in time, the HTF context disappears off-screen.
This script solves this by utilizing Unicode String Rendering. Instead of using box.new or line.new (which are anchored to the time/price axis), this indicator maps price data into a vertical string of characters (█ and ┆) and renders them inside a table.cell. Because tables are part of the chart's fixed UI layer (the "Glass Layer"), the monitor functions like a native dashboard widget that never moves.
Calculations & Underlying Logic
Data Aggregation: The script uses request.security to pull OHLC data from the user-defined HTF.
Dynamic Normalization: Since the widget has a fixed vertical height (Resolution), the script dynamically normalizes the HTF price range within the array to fit the vertical space of the table cell.
Monospace Alignment: By forcing a font.family_monospace, the script ensures that the "wicks" and "bodies" of the Unicode candles stay mathematically centered and symmetrical.
Usefulness for Traders
Scalping Context: A 1-minute trader can monitor the 15-minute or 1-hour trend without switching tabs or cluttering their workspace.
Persistent Visibility: Essential for traders who zoom in and out frequently; the HTF trend is always visible in the top-right corner.
Customizable UI: Users can adjust the "Vertical Resolution" to change the widget's height and toggle "Horizontal Spacing" to fit their specific screen layout.
Instructions for Use
HTF Timeframe: Choose the timeframe you wish to monitor.
Vertical Resolution: Increase for more detail in the candles, decrease for a more compact widget.
Position: Use the inputs to move the widget to any of the four corners of your screen.
The Smooths HTF Mini Chart is a technical utility designed for traders who require constant high-timeframe (HTF) context without sacrificing screen real estate or deal with the "drifting" issues associated with standard drawing objects. By leveraging the Pine Script Table API, this script creates a live candlestick "monitor" that is anchored to the UI layer of the chart, ensuring it stays perfectly positioned in the corner regardless of how a user drags or scales the primary price action.
The Technical Concept (Why it is Original)
Most HTF indicators overlay candles directly onto the main price chart. This presents two problems:
They clutter the primary timeframe's candles.
They are tied to bar indexes; when a user scrolls back in time, the HTF context disappears off-screen.
This script solves this by utilizing Unicode String Rendering. Instead of using box.new or line.new (which are anchored to the time/price axis), this indicator maps price data into a vertical string of characters (█ and ┆) and renders them inside a table.cell. Because tables are part of the chart's fixed UI layer (the "Glass Layer"), the monitor functions like a native dashboard widget that never moves.
Calculations & Underlying Logic
Data Aggregation: The script uses request.security to pull OHLC data from the user-defined HTF.
Dynamic Normalization: Since the widget has a fixed vertical height (Resolution), the script dynamically normalizes the HTF price range within the array to fit the vertical space of the table cell.
Monospace Alignment: By forcing a font.family_monospace, the script ensures that the "wicks" and "bodies" of the Unicode candles stay mathematically centered and symmetrical.
Usefulness for Traders
Scalping Context: A 1-minute trader can monitor the 15-minute or 1-hour trend without switching tabs or cluttering their workspace.
Persistent Visibility: Essential for traders who zoom in and out frequently; the HTF trend is always visible in the top-right corner.
Customizable UI: Users can adjust the "Vertical Resolution" to change the widget's height and toggle "Horizontal Spacing" to fit their specific screen layout.
Instructions for Use
HTF Timeframe: Choose the timeframe you wish to monitor.
Vertical Resolution: Increase for more detail in the candles, decrease for a more compact widget.
Position: Use the inputs to move the widget to any of the four corners of your screen.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.