OPEN-SOURCE SCRIPT
Trend Close 1/6 Highlight (Daily Reset)

Indicator Name: Trend Close 1/6 Highlight
Description:
This indicator highlights the first 6 bars of each trading day when the closing price is within the extreme 1/6 price range of that bar.
For a bearish bar (close < open) that closes in the lower 1/6 of its range (i.e., close ≤ low + (high-low)/6), a semi‑transparent light green rectangle is drawn from high to low, covering the entire price range of the bar.
For a bullish bar (close > open) that closes in the upper 1/6 of its range (i.e., close ≥ high – (high-low)/6), a semi‑transparent light pink rectangle is drawn from high to low.
Key features:
The count resets at the start of each new trading day (detected by a change in the day of the week).
Only the first 6 bars of the day are evaluated; no rectangles are drawn on later bars.
Rectangles are aligned precisely with the bar's time interval (time to time_close) using xloc.bar_time, so they do not extend into adjacent bars.
The background color transparency can be adjusted (default: 80/100).
No border is drawn (border_width = 0).
Use case:
Quickly spot bars where price closes extremely near the low (strong bearish momentum) or extremely near the high (strong bullish momentum) during the early part of the trading session.
Description:
This indicator highlights the first 6 bars of each trading day when the closing price is within the extreme 1/6 price range of that bar.
For a bearish bar (close < open) that closes in the lower 1/6 of its range (i.e., close ≤ low + (high-low)/6), a semi‑transparent light green rectangle is drawn from high to low, covering the entire price range of the bar.
For a bullish bar (close > open) that closes in the upper 1/6 of its range (i.e., close ≥ high – (high-low)/6), a semi‑transparent light pink rectangle is drawn from high to low.
Key features:
The count resets at the start of each new trading day (detected by a change in the day of the week).
Only the first 6 bars of the day are evaluated; no rectangles are drawn on later bars.
Rectangles are aligned precisely with the bar's time interval (time to time_close) using xloc.bar_time, so they do not extend into adjacent bars.
The background color transparency can be adjusted (default: 80/100).
No border is drawn (border_width = 0).
Use case:
Quickly spot bars where price closes extremely near the low (strong bearish momentum) or extremely near the high (strong bullish momentum) during the early part of the trading session.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.