OPEN-SOURCE SCRIPT
PDHL + Current Day HL Tracker

📝 PDHL + Current Day HL Indicator – Release Notes & User Guide
📦 Version
- Pine Script v6 compatible
🧠 Overview
This indicator draws and manages key high/low levels for effective intraday trading:
- Plots Previous Day High (PDH) and Previous Day Low (PDL) as solid lines.
- Converts PDH/PDL lines to dashed when breached intraday.
- After a breach, draws and updates the Current Day High (CDH) or Low (CDL).
✅ Features
1. Previous Day High/Low (PDHL)
- Drawn at the start of each new day.
- Remain visible all day, even if breached.
- Change from solid to dashed when broken.
2. Current Day High/Low (CDHL)
- Only drawn if the respective PDH or PDL is breached.
- Automatically updates as new highs/lows form during the day.
⚙️ How It Works
| Condition | Action |
|--------------------------|---------------------------------------------------------------|
| New day starts | Draw PDH/PDL (solid lines) based on the prior day's values. |
| Price breaks PDH | PDH becomes dashed; CDH line is drawn and updates dynamically.|
| Price breaks PDL | PDL becomes dashed; CDL line is drawn and updates dynamically.|
| Intraday HL changes | CDHL lines adjust with each new high/low of the day. |
🎯 Trading Use Cases
- Identify fakeouts or breakouts at previous day levels.
- Use current day HL to confirm momentum after PDHL breaches.
- Combine with price action, SMAs, or Darvas boxes for high-probability setups.
🛠️ Coming Improvements (Optional)
- Toggle for always showing current day HL
- Alerts on PDHL/CDHL breaches
- Session filters for futures/forex
Happy Trading!
📦 Version
- Pine Script v6 compatible
🧠 Overview
This indicator draws and manages key high/low levels for effective intraday trading:
- Plots Previous Day High (PDH) and Previous Day Low (PDL) as solid lines.
- Converts PDH/PDL lines to dashed when breached intraday.
- After a breach, draws and updates the Current Day High (CDH) or Low (CDL).
✅ Features
1. Previous Day High/Low (PDHL)
- Drawn at the start of each new day.
- Remain visible all day, even if breached.
- Change from solid to dashed when broken.
2. Current Day High/Low (CDHL)
- Only drawn if the respective PDH or PDL is breached.
- Automatically updates as new highs/lows form during the day.
⚙️ How It Works
| Condition | Action |
|--------------------------|---------------------------------------------------------------|
| New day starts | Draw PDH/PDL (solid lines) based on the prior day's values. |
| Price breaks PDH | PDH becomes dashed; CDH line is drawn and updates dynamically.|
| Price breaks PDL | PDL becomes dashed; CDL line is drawn and updates dynamically.|
| Intraday HL changes | CDHL lines adjust with each new high/low of the day. |
🎯 Trading Use Cases
- Identify fakeouts or breakouts at previous day levels.
- Use current day HL to confirm momentum after PDHL breaches.
- Combine with price action, SMAs, or Darvas boxes for high-probability setups.
🛠️ Coming Improvements (Optional)
- Toggle for always showing current day HL
- Alerts on PDHL/CDHL breaches
- Session filters for futures/forex
Happy Trading!
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.