OPEN-SOURCE SCRIPT
Atualizado Previous & Current Day Levels

Pine Script indicator that displays key price levels from the previous trading day and the current day's opening price on your chart.
What it displays:
The script draws four horizontal reference lines across your chart:
Previous Day High (PDH) - The highest price reached yesterday
Previous Day Low (PDL) - The lowest price reached yesterday
Previous Day Close (PDC) - Yesterday's closing price
Daily Open (DO) - Today's opening price
Key features:
Visual customization - You can adjust colors, line styles (solid/dashed/dotted), line thickness, and text size for all levels
Label positioning - Labels can be offset to the right of the current price action to keep them visible and out of the way
Flexible display - Choose between full descriptive labels ("Prev Day High") or shorthand abbreviations ("PDH")
Performance optimization - The script limits how far back lines are drawn (configurable up to 5000 bars) to prevent rendering issues
Clean presentation - Each level includes a solid horizontal line from its starting point, plus a dotted connector line extending to the label
Why traders use it:
These levels are important reference points for intraday traders. Previous day levels often act as support/resistance zones, and the daily open helps identify potential trend direction. The script automatically updates these levels each day, making it easy to track key price areas without manual drawing.
What it displays:
The script draws four horizontal reference lines across your chart:
Previous Day High (PDH) - The highest price reached yesterday
Previous Day Low (PDL) - The lowest price reached yesterday
Previous Day Close (PDC) - Yesterday's closing price
Daily Open (DO) - Today's opening price
Key features:
Visual customization - You can adjust colors, line styles (solid/dashed/dotted), line thickness, and text size for all levels
Label positioning - Labels can be offset to the right of the current price action to keep them visible and out of the way
Flexible display - Choose between full descriptive labels ("Prev Day High") or shorthand abbreviations ("PDH")
Performance optimization - The script limits how far back lines are drawn (configurable up to 5000 bars) to prevent rendering issues
Clean presentation - Each level includes a solid horizontal line from its starting point, plus a dotted connector line extending to the label
Why traders use it:
These levels are important reference points for intraday traders. Previous day levels often act as support/resistance zones, and the daily open helps identify potential trend direction. The script automatically updates these levels each day, making it easy to track key price areas without manual drawing.
Notas de Lançamento
fixed some issues.Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.