OPEN-SOURCE SCRIPT
Week high / Week low (Mo–Fr)

The indicator tracks the weekly high and low levels of the market starting from Monday 00:00 and updates them throughout the week until Friday. It draws horizontal lines across the chart representing:
Weekly High
Weekly Low
Each level also displays a label that can be positioned in different ways depending on user settings.
🧠 How it works step-by-step
1. Every Monday a new week starts
When a new week begins:
The script stores the current candle’s high as the initial weekHigh
And the current candle’s low as weekLow
Previous week's lines and labels are deleted
New horizontal lines are created and extended to the right
Labels (for high & low) are placed initially at the start of the week
2. During Monday–Friday
On every candle:
If a new higher price is reached → weekly high updates
If a new lower price is reached → weekly low updates
The horizontal line moves to the new value
A saved index remembers where that high/low was created
3. Label Position Control
The user can choose how labels should be anchored:
Mode Meaning
Update point Label stays where the high/low occurred
Right edge Label always moves to the current bar (right end of week)
Right offset Like Right edge but shifted further right by X bars
You can also customize:
label background color
label text color
label size
whether the label points up/down (above or below the line)
line color, style, and width
4. Weekend behavior
On Saturday, the script stops extending the lines, effectively freezing the weekly high and low for that completed week.
Summary
This indicator is useful for traders who want automatic weekly levels, visually clean chart structure, and customizable label placement. It tracks market structure weekly, keeps levels persistent across the chart, and lets you choose exactly how those levels appear.
If you want, I can also create:
✔ previous week high/low
✔ midline (50% of the range)
✔ alerts when price breaks the weekly high/low
✔ highlight liquidity sweeps
Weekly High
Weekly Low
Each level also displays a label that can be positioned in different ways depending on user settings.
🧠 How it works step-by-step
1. Every Monday a new week starts
When a new week begins:
The script stores the current candle’s high as the initial weekHigh
And the current candle’s low as weekLow
Previous week's lines and labels are deleted
New horizontal lines are created and extended to the right
Labels (for high & low) are placed initially at the start of the week
2. During Monday–Friday
On every candle:
If a new higher price is reached → weekly high updates
If a new lower price is reached → weekly low updates
The horizontal line moves to the new value
A saved index remembers where that high/low was created
3. Label Position Control
The user can choose how labels should be anchored:
Mode Meaning
Update point Label stays where the high/low occurred
Right edge Label always moves to the current bar (right end of week)
Right offset Like Right edge but shifted further right by X bars
You can also customize:
label background color
label text color
label size
whether the label points up/down (above or below the line)
line color, style, and width
4. Weekend behavior
On Saturday, the script stops extending the lines, effectively freezing the weekly high and low for that completed week.
Summary
This indicator is useful for traders who want automatic weekly levels, visually clean chart structure, and customizable label placement. It tracks market structure weekly, keeps levels persistent across the chart, and lets you choose exactly how those levels appear.
If you want, I can also create:
✔ previous week high/low
✔ midline (50% of the range)
✔ alerts when price breaks the weekly high/low
✔ highlight liquidity sweeps
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。