OPEN-SOURCE SCRIPT
Previous Day Regular Session OHLC Levels

Previous Day RTH OHLC Levels
This indicator displays the most recent completed regular trading session’s Open, High, Low, and Close levels on an intraday chart.
It was built for traders who keep extended-hours data visible but still want clean reference levels from the regular session only. For U.S. equities, the default regular session is set to 09:30 to 16:00, and the default after-hours session is set to 16:00 to 20:00.
What it shows
PDH: Previous regular-session high
PDL: Previous regular-session low
PDC: Previous regular-session close
PDO: Previous regular-session open
The indicator tracks the current regular session’s OHLC values during the day. When after-hours begins, it locks those values and displays them as the prior completed regular-session levels.
Why use it
These levels can be useful as reference points for intraday context, especially when viewing premarket or after-hours price action. They can help show whether price is trading above or below the prior regular-session range, open, or close.
Settings
Regular session: default 0930-1600
After-hours session: default 1600-2000
Show or hide solid OHLC lines
Show or hide right-side labels
Adjust label offset, label size, and line width
Important notes
This is not a buy or sell signal. It does not predict direction. It simply plots prior regular-session OHLC reference levels.
For best results, use it on intraday charts with extended-hours data enabled. It is designed around U.S. equity market hours.
This indicator displays the most recent completed regular trading session’s Open, High, Low, and Close levels on an intraday chart.
It was built for traders who keep extended-hours data visible but still want clean reference levels from the regular session only. For U.S. equities, the default regular session is set to 09:30 to 16:00, and the default after-hours session is set to 16:00 to 20:00.
What it shows
PDH: Previous regular-session high
PDL: Previous regular-session low
PDC: Previous regular-session close
PDO: Previous regular-session open
The indicator tracks the current regular session’s OHLC values during the day. When after-hours begins, it locks those values and displays them as the prior completed regular-session levels.
Why use it
These levels can be useful as reference points for intraday context, especially when viewing premarket or after-hours price action. They can help show whether price is trading above or below the prior regular-session range, open, or close.
Settings
Regular session: default 0930-1600
After-hours session: default 1600-2000
Show or hide solid OHLC lines
Show or hide right-side labels
Adjust label offset, label size, and line width
Important notes
This is not a buy or sell signal. It does not predict direction. It simply plots prior regular-session OHLC reference levels.
For best results, use it on intraday charts with extended-hours data enabled. It is designed around U.S. equity market hours.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.