OPEN-SOURCE SCRIPT

6-9 session & levels

425
6-9 Session & Levels - Customizable Range Analysis Indicator

Description:
This indicator provides comprehensive session-based range analysis designed for intraday traders. It calculates and displays key levels based on a customizable session period (default 6:00-9:00 AM ET).
Core Features:
Session Tracking

Monitors user-defined session times with timezone support
Displays session open, high, and low levels
Highlights session range with optional box visualization
Shows previous day RTH (Regular Trading Hours: 9:30 AM - 4:00 PM) levels

Range Levels

25%, 50%, and 75% range levels within the session
Range deviations at 0.5x, 1.0x, and 2.0x multiples
Fibonacci extension levels (customizable, default 1.33x and 1.66x)
Optional fill zones between Fibonacci levels

Time Zone Highlighting

Marks the 9:40-9:50 AM period as a potential reversal zone
Vertical lines with shading to identify key time windows

Statistical Analysis

Calculates mean and median extension levels based on historical sessions
Displays statistics table showing current range, average range, range difference, and z-score
Customizable sample size (1-100 sessions) for statistical calculations
Option to anchor extensions from either session open or high/low points

Input Settings Explained:
Session Settings

Levels Session Time: Define your session window in HHMM-HHMM format (default: 0600-0900)
Time Zone: Choose from UTC, America/New_York, America/Chicago, America/Los_Angeles, Europe/London, or Asia/Tokyo

Anchor Settings

Show Session Anchor: Toggle the session anchor line (marks session open price at 6:00 AM)
Anchor Style/Color/Width: Customize appearance (Solid/Dashed/Dotted, color, 1-4 width)
Show Anchor Label: Display price label for the anchor
Session Open Line: Similar options for the session open reference line

Range Box Settings

Show Range Box: Display a shaded rectangle highlighting the session high-to-low range
Range Box Color: Set the box background color and transparency

Range Levels (25%/50%/75%)

Show Range Levels: Toggle all three intermediate levels on/off
Individual Level Styling: Each level (25%, 50%, 75%) has its own color, style, and width settings
Show Range Level Labels: Display price labels for each level

Range Deviations

Show Range Deviations: Toggle deviation levels on/off
0.5x/1.0x/2.0x Settings: Each deviation multiplier can be customized with its own color, line style (Solid/Dashed/Dotted), and width
Show Range Deviation Labels: Display labels showing the deviation price levels

Previous Day RTH Levels

Show Previous RTH Levels: Display yesterday's regular trading hours high and low
RTH High/Low Styling: Separate color, style, and width settings for each level
Show Previous RTH Labels: Toggle price labels for RTH levels

Time Zones

Show 9:40-9:50 AM Zone: Highlight this specific time period with vertical lines and shading
Zone Color: Set the background fill color for the time zone
Zone Label Color/Text: Customize the label appearance and text

Fibonacci Extension Settings

Show Fibonacci Extensions: Toggle Fib levels on/off
Fib Extension Color/Style/Width: Customize line appearance
Show Fib Extension Labels: Display price labels
Fib Ext Level 1/2: Set custom multipliers (default 1.33 and 1.66, range 0-5 in 0.1 increments)
Show Fibonacci Fills: Display shaded zones between Fib levels
Fib Fill Color: Customize the fill color and transparency

Session High/Low Settings

Show Session High/Low Lines: Display the actual session extremes
Style/Color/Width: Customize line appearance
Show Labels: Toggle price labels for high/low levels

Extension Stats Settings

Show Statistical Levels on Chart: Display mean and median extension levels based on historical data
Extension Anchor Point: Choose whether to anchor from "Open" or "High/Low" of the session
Number of Sessions for Statistics: Set sample size (1-100, default 60) for calculating averages
Mean/Median High Extension: Separate styling for each statistical level (color, style, width)
Mean/Median Low Extension: Separate styling for downside statistical levels

Tables

Show Statistics Table: Display a summary table with current range, average range, difference, z-score, and sample size
Table Position: Choose from 9 positions (Bottom/Middle/Top + Center/Left/Right)
Table Text Size: Select from Auto, Tiny, Small, Normal, Large, or Huge

Display Settings

Projection Offset: Number of bars to extend lines forward (default 24)
Label Size: Choose from Tiny, Small, Normal, or Large
Price Decimal Precision: Set decimal places for price labels (0-6)

How It Works:
The indicator tracks the specified session period and calculates the session's open, high, low, and range. At the end of the session (9:00 AM by default), it projects all configured levels forward for the trading day. The statistical features analyze the last N sessions (you choose the number) to calculate typical extension behavior from either the session open or the session high/low points.
The z-score calculation helps identify whether the current session's range is normal, expanded, or contracted compared to recent history, allowing traders to adjust expectations for the rest of the day.

Use Case:
This indicator helps traders identify key support and resistance levels based on early session price action, understand current range context relative to historical averages, and spot potential reversal zones during specific time periods.

Note: This indicator is for informational purposes only and does not constitute investment advice. Always perform your own analysis before making trading decisions.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.