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. Подробнее читайте в Условиях использования.