OPEN-SOURCE SCRIPT
已更新 52-Week High Line

52-Week High Line
This indicator automatically identifies and plots the highest price level reached over the past 52 weeks (252 trading days) directly on your chart as a horizontal line.
The line starts from the beginning of the 52-week lookback window and extends to the right, giving you a clear visual reference of where the annual resistance level sits at all times. The line updates only on the current live bar, so it remains stable as you scroll or pan through chart history.
Features:
- Plots the rolling 52-week high as a clean horizontal line
- Line anchors to the start of the current 52-week window, not the original high bar
- Label displays the exact 52-week high price level
- Fully customizable — line color, width, and style (Solid / Dashed / Dotted)
- Toggle label on or off
How to use:
- Price approaching or breaking above the 52-week high line signals potential breakout momentum
- Price consistently rejected below the line signals strong resistance
- Best used on the Daily timeframe for true 52-week accuracy. For other timeframes, adjust the lookback accordingly (Weekly = 52 bars, Monthly = 12 bars)
- Note: The default lookback of 252 bars is calibrated for stock markets. For crypto or forex (24/7 markets), change the lookback to 365 bars for daily charts.
This indicator automatically identifies and plots the highest price level reached over the past 52 weeks (252 trading days) directly on your chart as a horizontal line.
The line starts from the beginning of the 52-week lookback window and extends to the right, giving you a clear visual reference of where the annual resistance level sits at all times. The line updates only on the current live bar, so it remains stable as you scroll or pan through chart history.
Features:
- Plots the rolling 52-week high as a clean horizontal line
- Line anchors to the start of the current 52-week window, not the original high bar
- Label displays the exact 52-week high price level
- Fully customizable — line color, width, and style (Solid / Dashed / Dotted)
- Toggle label on or off
How to use:
- Price approaching or breaking above the 52-week high line signals potential breakout momentum
- Price consistently rejected below the line signals strong resistance
- Best used on the Daily timeframe for true 52-week accuracy. For other timeframes, adjust the lookback accordingly (Weekly = 52 bars, Monthly = 12 bars)
- Note: The default lookback of 252 bars is calibrated for stock markets. For crypto or forex (24/7 markets), change the lookback to 365 bars for daily charts.
版本注释
Updated version开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。