OPEN-SOURCE SCRIPT
Previous Day & Week High/Low DangNP

The "Previous Day & Week High/Low" indicator is a simple yet powerful price action tool designed for day traders and swing traders. It automatically identifies and plots the highest and lowest price levels of the previous trading day and the previous trading week directly onto your chart, saving you the time of drawing them manually.
Key Features
Previous Day Levels (Blue Lines): Automatically plots the Previous Day High (PDH) and Previous Day Low (PDL). These lines are configured to display only on intraday timeframes to keep your higher timeframe charts clean.
Previous Week Levels (Purple Lines): Plots the Previous Week High (PWH) and Previous Week Low (PWL). These are visible on both intraday and daily timeframes.
Fully Customizable: You can easily toggle the visibility of either the Daily or Weekly levels on and off via the indicator's Inputs settings.
How to Use
Previous Day and Previous Week highs and lows are crucial structural levels in price action trading:
Support & Resistance: These levels often act as natural barriers where price might stall, consolidate, or reverse.
Liquidity Sweeps (False Breakouts): Institutional traders often hunt the liquidity resting above previous highs or below previous lows. Traders can look for price to "sweep" these levels and reject them as a strong reversal signal.
Breakouts: A strong, sustained break and candle close beyond the previous day or week's extremes can signal trend continuation.
This script is lightweight, distraction-free, and written in Pine Script v6 for optimal performance.
Key Features
Previous Day Levels (Blue Lines): Automatically plots the Previous Day High (PDH) and Previous Day Low (PDL). These lines are configured to display only on intraday timeframes to keep your higher timeframe charts clean.
Previous Week Levels (Purple Lines): Plots the Previous Week High (PWH) and Previous Week Low (PWL). These are visible on both intraday and daily timeframes.
Fully Customizable: You can easily toggle the visibility of either the Daily or Weekly levels on and off via the indicator's Inputs settings.
How to Use
Previous Day and Previous Week highs and lows are crucial structural levels in price action trading:
Support & Resistance: These levels often act as natural barriers where price might stall, consolidate, or reverse.
Liquidity Sweeps (False Breakouts): Institutional traders often hunt the liquidity resting above previous highs or below previous lows. Traders can look for price to "sweep" these levels and reject them as a strong reversal signal.
Breakouts: A strong, sustained break and candle close beyond the previous day or week's extremes can signal trend continuation.
This script is lightweight, distraction-free, and written in Pine Script v6 for optimal performance.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。