OPEN-SOURCE SCRIPT

Weekly price box

93
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

免责声明

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.