OPEN-SOURCE SCRIPT
Previous/Current Day High/Low/Open/Close Levels

This Pine Script creates a TradingView indicator that displays key price levels from previous and current trading days. Here's what it does:
Main Features
Price Level Display:
Previous Day High (PDH) - Highest price from yesterday
Previous Day Low (PDL) - Lowest price from yesterday
Previous Day Close (PDC) - Closing price from yesterday
Current Day Open (DO) - Opening price of today
Intraday High (IDH) - Highest price reached so far today
Intraday Low (IDL) - Lowest price reached so far today
Key Settings
Days Back - Shows levels for the last 1-30 days (default: 5 days)
Line Extension - Projects lines forward beyond the current candle (default: 25 bars)
Toggle Controls - Turn each level on/off individually
Customizable Colors - Each level has its own color (red for highs, green for lows, etc.)
Labels - Optional text labels (PDH, PDL, etc.) positioned on left or right side
How It Works
The script draws horizontal lines at these key price levels throughout the trading day. Lines break at each new day to avoid connecting across sessions. Dashed connector lines extend to the labels for easy identification.
This is particularly useful for intraday traders who watch these levels for potential support/resistance zones and breakout opportunities.
Main Features
Price Level Display:
Previous Day High (PDH) - Highest price from yesterday
Previous Day Low (PDL) - Lowest price from yesterday
Previous Day Close (PDC) - Closing price from yesterday
Current Day Open (DO) - Opening price of today
Intraday High (IDH) - Highest price reached so far today
Intraday Low (IDL) - Lowest price reached so far today
Key Settings
Days Back - Shows levels for the last 1-30 days (default: 5 days)
Line Extension - Projects lines forward beyond the current candle (default: 25 bars)
Toggle Controls - Turn each level on/off individually
Customizable Colors - Each level has its own color (red for highs, green for lows, etc.)
Labels - Optional text labels (PDH, PDL, etc.) positioned on left or right side
How It Works
The script draws horizontal lines at these key price levels throughout the trading day. Lines break at each new day to avoid connecting across sessions. Dashed connector lines extend to the labels for easy identification.
This is particularly useful for intraday traders who watch these levels for potential support/resistance zones and breakout opportunities.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.