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!
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.