OPEN-SOURCE SCRIPT
Weekly price box

Weekend Trap / Custom Timebox Analyzer
This indicator allows traders to define a specific time window (e.g., the "Weekend Trap" period from Friday to Sunday, or a full weekly range) and automatically draws a box highlighting the price action during that session. It is designed to help visualize gaps, ranges, and trend direction over specific timeframes.
Key Features
Dynamic Range Detection: automatically draws a box connecting the Highest High and Lowest Low occurring between your start and end times.
Trend Visualization: The box changes color dynamically based on price performance:
Bullish (Blue): Close is higher than the Open of the defined period.
Bearish (Red): Close is lower than the Open of the defined period.
Smart Labeling: Displays a customizable label (default: "Box") along with the real-time Percentage Change of the period. The label is positioned intelligently outside the box to avoid cluttering the price action.
Flexible Timing:
Supports standard intraday sessions (e.g., Mon 09:00 to Mon 17:00).
Supports "wrap-around" sessions (e.g., Friday 23:00 to Sunday 17:00).
New: Supports full-week monitoring (e.g., Friday to Friday) by handling start times that are later than end times on the same day.
Fully Customizable:
Configure specific Bullish and Bearish colors (Border, Background, Text).
Adjust line styles (Solid, Dashed, Dotted) and widths.
Select days via easy-to-use dropdown menus.
How to Use
Time Settings:
Select your Start Day and Time (e.g., Friday 23:00).
Select your End Day and Time (e.g., Sunday 17:00).
Note: Times are based on the Chart/Exchange time.
Visual Settings:
Go to the settings menu to define your preferred colors for Bullish and Bearish scenarios.
Toggle the Label on/off and adjust text size.
Use Cases
Weekend Gaps: Monitor price action that occurs during off-hours or between market close and open.
Opening Range Breakouts: Define the first hour of trading to see the initial range.
Weekly Profiles: Set the start and end day to the same day (e.g., Friday to Friday) to visualize the entire week's range and net performance.
Built with Pine Script™ v6
This indicator allows traders to define a specific time window (e.g., the "Weekend Trap" period from Friday to Sunday, or a full weekly range) and automatically draws a box highlighting the price action during that session. It is designed to help visualize gaps, ranges, and trend direction over specific timeframes.
Key Features
Dynamic Range Detection: automatically draws a box connecting the Highest High and Lowest Low occurring between your start and end times.
Trend Visualization: The box changes color dynamically based on price performance:
Bullish (Blue): Close is higher than the Open of the defined period.
Bearish (Red): Close is lower than the Open of the defined period.
Smart Labeling: Displays a customizable label (default: "Box") along with the real-time Percentage Change of the period. The label is positioned intelligently outside the box to avoid cluttering the price action.
Flexible Timing:
Supports standard intraday sessions (e.g., Mon 09:00 to Mon 17:00).
Supports "wrap-around" sessions (e.g., Friday 23:00 to Sunday 17:00).
New: Supports full-week monitoring (e.g., Friday to Friday) by handling start times that are later than end times on the same day.
Fully Customizable:
Configure specific Bullish and Bearish colors (Border, Background, Text).
Adjust line styles (Solid, Dashed, Dotted) and widths.
Select days via easy-to-use dropdown menus.
How to Use
Time Settings:
Select your Start Day and Time (e.g., Friday 23:00).
Select your End Day and Time (e.g., Sunday 17:00).
Note: Times are based on the Chart/Exchange time.
Visual Settings:
Go to the settings menu to define your preferred colors for Bullish and Bearish scenarios.
Toggle the Label on/off and adjust text size.
Use Cases
Weekend Gaps: Monitor price action that occurs during off-hours or between market close and open.
Opening Range Breakouts: Define the first hour of trading to see the initial range.
Weekly Profiles: Set the start and end day to the same day (e.g., Friday to Friday) to visualize the entire week's range and net performance.
Built with Pine Script™ v6
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.