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提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。