OPEN-SOURCE SCRIPT
更新済

Premarket High/Low + Prior Day High/Low + Opening Price

387
Futures Levels – Premarket High/Low + Prior Day High/Low + Opening Price

Clean and accurate session levels designed primarily for futures traders (ES, NQ, YM, RTY, etc.), but also usable on equities.

What it plots:
• Premarket High & Low – Highest high and lowest low of the most recent overnight/premarket session
• Prior Day High & Low – High and low of the most recent completed Regular Trading Hours (RTH) session
• Opening Price – The actual 09:30 ET opening price of the most recent session

Key Features:
• Shows only the most recent levels (no historical clutter)
• Correctly handles weekends and pre-market gaps — on Sunday or Monday before the open you will see Friday’s Premarket High/Low, Friday’s RTH High/Low, and Friday’s 09:30 open
• Lines start at their true origin bar and extend only to the right
• Fully independent settings for each level (color, line style, and thickness)
• Session times are fully adjustable

How to use:
1. Add the indicator to an intraday chart
2. Make sure Extended Hours (ETH) is enabled
3. Adjust colors, styles, and widths in the settings to your preference

Adjusting for Equities (Stocks/ETFs):
By default the sessions are set for futures (Premarket 18:00–09:29 ET).
For stocks and ETFs, simply change the session inputs in the settings to:
• Premarket Session → 0400-0929
• RTH Session → 0930-1600

Ideal for day traders and scalpers who want clean, reliable reference levels without the noise of older session lines.
リリースノート
Changed the chart that was displaying and the default line colors.
リリースノート
Fixed a runtime error ("requested historical offset is beyond the historical buffer's limit") that could occur on lower timeframes and after weekends.

Levels are now anchored by bar time instead of bar index. The prior-day and premarket origins can sit hundreds of bars behind the current bar, which exceeded Pine's historical buffer on 1- and 2-minute charts. Time-based anchoring removes that limit entirely, so the error can't recur at any timeframe.

No changes to inputs, defaults, or plotted levels — existing settings carry over.
リリースノート
🛠️ What’s Changed in This Update

Opening Price Vertical Vector Fix: Fixed an issue where the white Opening Price line rendered as a vertical line during the first bar of the Regular Trading Session (09:30 AM).

The drawing logic now ensures $x_2 > x_1$ when calculating timestamps on active opening bars.ETH/RTH Chart Mode Fix: Fixed a session-tracking bug where Prior Day High and Low levels vanished if your chart view was toggled to Regular Trading Hours (RTH) only.

Prior session stats are now safely archived regardless of chart display settings.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。