PriorHourRangeLevels_v0.1
Created by dc_77 | © 2025 | Mozilla Public License 2.0
Overview
"PriorHourRangeLevels_v0.1" is a versatile Pine Script™ indicator designed to help traders visualize and analyze price levels based on the prior hour’s range. It overlays key levels—High, Low, 75%, 50% (EQ), and 25%—from the previous hour onto the current price chart, alongside the current hour’s opening price. With customizable display options and time zone support, it’s ideal for intraday traders looking to identify support, resistance, and breakout zones.
How It Works
Hourly Reset: The indicator detects the start of each hour based on your chosen time zone (e.g., "America/New_York" by default).
Prior Hour Range: It calculates the High and Low of the previous hour, then derives three additional levels:
75%: 75% of the range above the Low.
EQ (50%): The midpoint of the range.
25%: 25% of the range above the Low.
Current Hour Open: Displays the opening price of the current hour.
Projection: Lines extend forward (default: 24 bars) to project these levels into the future, aiding in real-time analysis.
Alerts: Triggers alerts when the price crosses any of the prior hour’s levels (High, 75%, EQ, 25%, Low).
Key Features
Time Zone Flexibility: Choose from options like UTC, New York, Tokyo, or London to align with your trading session.
Visual Customization:
Toggle visibility for each level (High, Low, 75%, EQ, 25%, Open, and Anchor).
Adjust line styles (Solid, Dashed, Dotted), colors, and widths.
Show or hide labels with adjustable sizes (Tiny, Small, Normal, Large).
Anchor Line: A vertical line marks the start of the prior hour, with optional labeling.
Alert Conditions: Set up notifications for price crossings to catch key moments without watching the chart.
Usage Tips
Use the High and Low as potential breakout levels, while 75%, EQ, and 25% act as intermediate support/resistance zones.
Trend Confirmation: Watch how price interacts with the EQ (50%) level to gauge momentum.
Session Planning: Adjust the time zone to match your market (e.g., "Europe/London" for FTSE trading).
Projection Offset: Extend or shorten the lines (via "Projection Offset") based on your chart timeframe.
Inputs
Time Zone: Select your preferred market time zone.
Anchor Settings: Show/hide the prior hour start line, style, color, width, and label.
Level Settings: Customize visibility, style, color, width, and labels for Open, High, 75%, EQ, 25%, and Low.
Display: Set projection length and label size.
Feedback welcome—happy trading!