OPEN-SOURCE SCRIPT
All Levels

This script draws key price levels on your chart, including:
• Previous Day (PD): High, Low, Close
• Day Before Yesterday (DBY): High, Low, Close
• Pre-Market (PM): High and Low
• Today’s levels: High, Low, Open, Close
• Current bar levels: High, Low, Open, Close
Each level is displayed as a horizontal line with a label showing the level value.
It works on any timeframe, including 1-minute charts, and automatically updates as new bars form.
⸻
2. Features
1. Custom Colors
Each type of level has its own color, declared as a const color. For example:
• Previous Day High = red
• Today’s Close = gold
• Pre-Market High = fuchsia
2. Right-Extending Lines
All horizontal levels extend to the right, so you always see them on the chart.
3. Persistent Labels
Every line has a label at the right side showing its name and price. For example:
• PDH 422
• TODL 415.5
4. Dynamic Updates
The script updates automatically whenever a new bar forms, so levels stay accurate.
5. Session-Based Pre-Market
You can define the pre-market session (default “04:00–09:30 EST”). The script calculates the high and low of this session only.
6. Checkbox Inputs
You can enable/disable entire groups of levels:
• Previous Day
• Day Before Yesterday
• Pre-Market
• Today
• Current bar
• Previous Day (PD): High, Low, Close
• Day Before Yesterday (DBY): High, Low, Close
• Pre-Market (PM): High and Low
• Today’s levels: High, Low, Open, Close
• Current bar levels: High, Low, Open, Close
Each level is displayed as a horizontal line with a label showing the level value.
It works on any timeframe, including 1-minute charts, and automatically updates as new bars form.
⸻
2. Features
1. Custom Colors
Each type of level has its own color, declared as a const color. For example:
• Previous Day High = red
• Today’s Close = gold
• Pre-Market High = fuchsia
2. Right-Extending Lines
All horizontal levels extend to the right, so you always see them on the chart.
3. Persistent Labels
Every line has a label at the right side showing its name and price. For example:
• PDH 422
• TODL 415.5
4. Dynamic Updates
The script updates automatically whenever a new bar forms, so levels stay accurate.
5. Session-Based Pre-Market
You can define the pre-market session (default “04:00–09:30 EST”). The script calculates the high and low of this session only.
6. Checkbox Inputs
You can enable/disable entire groups of levels:
• Previous Day
• Day Before Yesterday
• Pre-Market
• Today
• Current bar
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.