OPEN-SOURCE SCRIPT
PDH PDL Open Close

PDH/PDL/Open/Close Levels Indicator
Overview
This Pine Script indicator plots the Previous Day High (PDH), Previous Day Low (PDL), Previous Day Open (PDO), and Previous Day Close (PDC) levels on your chart. It's designed for traders who rely on key daily levels to identify potential support, resistance, and intraday reference points. The indicator supports multiple timeframes, allowing you to visualize these levels from higher timeframes (e.g., weekly or monthly) directly on lower timeframe charts.
Built with Pine Script v6, it's lightweight, customizable, and overlays seamlessly on any symbol. Lines extend slightly into the future for better visibility, and labels provide clear identification with price values.
Key Features
- Multi-Timeframe Support: Choose from predefined timeframes (5m to 1M) via the input settings to fetch and plot levels from the selected period.
- Clean Visualization:
- PDH and PDL: Solid black lines for high/low levels.
- PDO: Dotted blue line for the opening price.
- PDC: Dotted red line for the closing price.
- Dynamic Labels: Automatically placed at the end of each line, showing the timeframe and exact price (e.g., "1D High: 150.25").
- Efficient Updates: Lines and labels update in real-time without cluttering the chart—old elements are automatically cleaned up.
- Extension Handling: Lines extend 2 bars ahead by default, adjustable if needed via code modifications.
How to Use
1. Add to Chart**: Copy the script into TradingView's Pine Editor, save, and add it to your chart.
2. Customize Timeframe: In the indicator settings, select your desired timeframe (default: 1D). This pulls levels from the previous period of that timeframe.
3. Interpret Levels:
- Use PDH/PDL as potential resistance/support zones.
- PDO/PDC can highlight session biases (e.g., gap fills or continuation patterns).
- Ideal for day trading, swing setups, or aligning with higher timeframe context.
4. Best Practices: Works on any market (stocks, forex, crypto). Combine with volume or momentum indicators for confluence.
Settings
- Timeframe: Dropdown with options: 5m, 10m, 15m, 30m, 45m, 1H, 2H, 3H, 4H, 1D, 1W, 1M.
- No other inputs for simplicity—colors, styles, and extensions are hardcoded for a clean default look. Edit the script to tweak (e.g., line colors or extension length).
Overview
This Pine Script indicator plots the Previous Day High (PDH), Previous Day Low (PDL), Previous Day Open (PDO), and Previous Day Close (PDC) levels on your chart. It's designed for traders who rely on key daily levels to identify potential support, resistance, and intraday reference points. The indicator supports multiple timeframes, allowing you to visualize these levels from higher timeframes (e.g., weekly or monthly) directly on lower timeframe charts.
Built with Pine Script v6, it's lightweight, customizable, and overlays seamlessly on any symbol. Lines extend slightly into the future for better visibility, and labels provide clear identification with price values.
Key Features
- Multi-Timeframe Support: Choose from predefined timeframes (5m to 1M) via the input settings to fetch and plot levels from the selected period.
- Clean Visualization:
- PDH and PDL: Solid black lines for high/low levels.
- PDO: Dotted blue line for the opening price.
- PDC: Dotted red line for the closing price.
- Dynamic Labels: Automatically placed at the end of each line, showing the timeframe and exact price (e.g., "1D High: 150.25").
- Efficient Updates: Lines and labels update in real-time without cluttering the chart—old elements are automatically cleaned up.
- Extension Handling: Lines extend 2 bars ahead by default, adjustable if needed via code modifications.
How to Use
1. Add to Chart**: Copy the script into TradingView's Pine Editor, save, and add it to your chart.
2. Customize Timeframe: In the indicator settings, select your desired timeframe (default: 1D). This pulls levels from the previous period of that timeframe.
3. Interpret Levels:
- Use PDH/PDL as potential resistance/support zones.
- PDO/PDC can highlight session biases (e.g., gap fills or continuation patterns).
- Ideal for day trading, swing setups, or aligning with higher timeframe context.
4. Best Practices: Works on any market (stocks, forex, crypto). Combine with volume or momentum indicators for confluence.
Settings
- Timeframe: Dropdown with options: 5m, 10m, 15m, 30m, 45m, 1H, 2H, 3H, 4H, 1D, 1W, 1M.
- No other inputs for simplicity—colors, styles, and extensions are hardcoded for a clean default look. Edit the script to tweak (e.g., line colors or extension length).
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。