OPEN-SOURCE SCRIPT
已更新 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.
版本注释
fixed some issues.开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。