OPEN-SOURCE SCRIPT
Previous Day & Week OHLC

This indicator automatically plots key daily and weekly reference levels on your chart, helping traders identify potential support, resistance, liquidity zones and breakout areas.
Plotted Levels
Features
Plotted Levels
- PDH - Previous Day High
- PDL – Previous Day Low
- PDC – Previous Day Close
- DO – Current Day Open
- PWH – Previous Week High
- PWL – Previous Week Low
Features
- Automatic Daily & Weekly Level Plotting - Levels update automatically as new sessions begin.
- Smart Label Overlap Protection - When multiple levels share the same price, labels are automatically offset to prevent overlapping while maintaining readability.
- Preserved Color Identification - Each level retains its individual color, making it easy to distinguish between daily and weekly references.
- Historical Levels Option - Display only the current session's levels or keep previous levels visible for historical analysis and backtesting.
- Fully Customizable Appearance - Adjust colors, line styles, line widths, label sizes and label positions to match your preferred chart layout.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.