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.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.