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. קרא עוד ב־תנאי השימוש.