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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.