OPEN-SOURCE SCRIPT
Aggiornato

Previous Day and Current Day High/Low

5 449
Key Features:
Previous Day High and Low Lines:

Displays the high (PDH) and low (PDL) levels of the previous trading day.
Allows customization of line colors, styles (solid, dashed, or dotted), and widths.
Extends these lines by a specified number of candles into the current day for better visualization.
Current Day High and Low Lines:

Displays the high (CDH) and low (CDL) levels during the current day's regular trading hours.
Customizable line attributes, including color, style, width, and extension length.
Customizable Input Options:

User-configurable settings for both the previous and current day high/low lines, grouped under respective sections for clarity.
Regular trading hours can be defined manually (default is 9:30 AM to 4:00 PM).
Ability to toggle the visibility of the lines for both the previous and current days.
Automatic Reset at the Start of a New Day:

Captures the high and low values of the completed day and resets for the new day.
Deletes old lines and labels to ensure clarity and avoid overlap.
Dynamic Updates:

Updates the current day's high and low lines and labels as new data comes in.
Adjusts previous day lines dynamically based on the user-defined number of candles to extend.
Session-Based Filtering:

Ensures the calculations and updates are restricted to the defined regular trading hours.
Code Logic:
Input Groups: The script uses grouped inputs to allow users to configure settings for previous and current day levels separately.
Line and Label Management: It creates and deletes lines and labels dynamically to prevent clutter and keep the chart organized.
Session Check: Uses the session input to determine if a bar falls within regular trading hours.
High/Low Calculation: Tracks the high and low for both the previous and current days during regular trading hours.
New Day Detection: Identifies the start of a new trading day to update previous day values and reset current day variables.
Applications:
Intraday Trading: Helps traders identify critical support and resistance levels from the previous and current days.
Trend Analysis: Provides visual cues for price movement trends across consecutive days.
Custom Visualization: With extensive customization options, traders can adapt the indicator to suit their trading style and chart aesthetics.
This script is highly configurable, making it versatile for a wide range of trading strategies and styles.
Note di rilascio
📜 Script Description:
This powerful and clean Pine Script indicator combines multiple important trading tools into a single chart overlay:

✅ EMA Trend Table:

Displays a compact, color-coded table showing the trend (Bullish/Bearish) based on three customizable EMAs.

Shows an "Overall Trend" for quick market sentiment analysis (Strong Bullish, Strong Bearish, or Mixed).

✅ Previous Day High/Low (PDH/PDL) and Current Day High/Low (CDH/CDL):

Automatically plots the Regular Trading Hours (RTH) Highs and Lows for the previous and current days.

Clean, customizable lines (solid, dashed, dotted) with matching labels at the right of the screen for easy reference.

Automatically extends the lines and keeps the chart organized — old lines and labels are deleted and refreshed properly.

✅ Show/Hide Options:

Choose to show or hide Previous Day Levels, Current Day Levels, EMA Table, and EMA Lines independently.

✅ Customization:

Pick your own colors, styles, and line extension lengths.

Fully flexible session settings for defining RTH if you are outside standard market hours.

✅ Designed for:

Day traders, scalpers, and swing traders who need to quickly assess trend and key intraday levels.

Works best on intraday timeframes (1m, 5m, 15m, 1h).

✨ Why Traders Love It:
Quick Trend Recognition: No more guessing — the EMA Trend Table tells you exactly where you stand.

Key Levels at a Glance: Previous and Current Day Highs/Lows often act as strong support/resistance.

Clutter-Free: Smart line management keeps your chart clean and professional-looking.

Notes:

RTH session is adjustable for markets outside the US.

Script designed with performance and clarity in mind — optimized for fast bar-by-bar updates.

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.