OPEN-SOURCE SCRIPT
Обновлено HTF Candle Boxes

HTF Candle Boxes — Wick / Body / Wick + Liquidity Window
Renders each higher-timeframe candle (1H, 4H, or 1D) as three horizontal zones drawn over the lower-timeframe bars that compose it. Lets you see HTF structure without leaving your scalp/intraday chart.
What it draws
Upper wick zone — from HTF high down to the body top.
Body zone — tinted green (bullish) or red (bearish) based on HTF open vs close.
Lower wick zone — from body bottom down to HTF low.
Body midpoint — a dotted line at the exact 50% of the HTF body. Useful as an MSS / mean-reversion reference because price respects it more often than mid-of-candle.
Outer wrapper — a subtle gray border around the full HTF high-low range.
Liquidity window lines — two vertical lines per HTF candle bracketing the high-liquidity zones around each HTF rollover:
One 15 minutes after the HTF candle opens (near-open liquidity edge)
One 15 minutes before the HTF candle closes (near-close liquidity edge)
Both lines are confined inside the HTF box (no infinite extension cluttering the chart) and grow vertically with the candle as it forms. They only render on M1 / M3 / M15 / M30 charts — above M30 the 15-min bracket is finer than a bar, so it's hidden.
Why it's useful
HTF candles cleanly show institutional context without scrolling between timeframes.
The body midpoint becomes a real-time pullback / continuation level intraday.
The liquidity bracket marks the 15-min window straddling each HTF rollover, when most desk-driven flow concentrates around the candle close/open — a high-probability place for sweeps, reclaims, and reversal entries.
Inputs
HTF timeframe — 1H, 4H, or 1D.
Fill colors — upper wick, lower wick, bull body, bear body (defaults: gray wicks at 90% transparency, green/red body at 70%).
Show borders + Border color.
Show body midpoint + color, style (solid / dashed / dotted), width.
Wrap HTF candle in outer box + outer border color.
Show liquidity window lines + minutes ± boundary (default 15), color, style.
Implementation note
HTF o/h/l/c are aggregated directly from the LTF bars inside each HTF window — not pulled via request.security. That avoids the one-bar lag where request.security(..., lookahead_off) returns the prior confirmed HTF candle, which would otherwise leave LTF wicks poking outside the box. The boxes here always wrap every LTF bar they contain, on both historical and live data.
Published under MIT-style permissive use — feel free to fork and adapt.
Renders each higher-timeframe candle (1H, 4H, or 1D) as three horizontal zones drawn over the lower-timeframe bars that compose it. Lets you see HTF structure without leaving your scalp/intraday chart.
What it draws
Upper wick zone — from HTF high down to the body top.
Body zone — tinted green (bullish) or red (bearish) based on HTF open vs close.
Lower wick zone — from body bottom down to HTF low.
Body midpoint — a dotted line at the exact 50% of the HTF body. Useful as an MSS / mean-reversion reference because price respects it more often than mid-of-candle.
Outer wrapper — a subtle gray border around the full HTF high-low range.
Liquidity window lines — two vertical lines per HTF candle bracketing the high-liquidity zones around each HTF rollover:
One 15 minutes after the HTF candle opens (near-open liquidity edge)
One 15 minutes before the HTF candle closes (near-close liquidity edge)
Both lines are confined inside the HTF box (no infinite extension cluttering the chart) and grow vertically with the candle as it forms. They only render on M1 / M3 / M15 / M30 charts — above M30 the 15-min bracket is finer than a bar, so it's hidden.
Why it's useful
HTF candles cleanly show institutional context without scrolling between timeframes.
The body midpoint becomes a real-time pullback / continuation level intraday.
The liquidity bracket marks the 15-min window straddling each HTF rollover, when most desk-driven flow concentrates around the candle close/open — a high-probability place for sweeps, reclaims, and reversal entries.
Inputs
HTF timeframe — 1H, 4H, or 1D.
Fill colors — upper wick, lower wick, bull body, bear body (defaults: gray wicks at 90% transparency, green/red body at 70%).
Show borders + Border color.
Show body midpoint + color, style (solid / dashed / dotted), width.
Wrap HTF candle in outer box + outer border color.
Show liquidity window lines + minutes ± boundary (default 15), color, style.
Implementation note
HTF o/h/l/c are aggregated directly from the LTF bars inside each HTF window — not pulled via request.security. That avoids the one-bar lag where request.security(..., lookahead_off) returns the prior confirmed HTF candle, which would otherwise leave LTF wicks poking outside the box. The boxes here always wrap every LTF bar they contain, on both historical and live data.
Published under MIT-style permissive use — feel free to fork and adapt.
Информация о релизе
Added opening point line optionСкрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.