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.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.