OPEN-SOURCE SCRIPT
ATH Levels

ATH Levels
All-time high distance tracker with dynamic tolerance zones, trend leg measurement, and precision alerts for SPY pullback and correction entries.
---
What it does:
ATH Levels automatically tracks the all-time high price and plots key percentage retracement levels below it. Each level represents a statistically significant support zone where SPY has historically shown mean reversion behavior — making them ideal reference points for swing and long term entry planning.
Key levels:
- ATH — current all-time high with days elapsed counter
- -3% / -4% — shallow pullback zones, first reaction levels
- -5% — standard pullback threshold, high probability bounce zone
- -10% — correction territory entry zone
- -15% / -20% — deep correction zones, high conviction long term entries
- -25% — bear market territory (disabled by default)
Dynamic tolerance zones:
Only the two nearest levels to current price show active tolerance bands — keeping the chart clean while highlighting exactly where price is most likely to react. Tolerance is tighter near ATH (-3%/-4% = 0.20%) and wider at deeper levels (0.30%).
Now label:
A floating label at current price shows exact distance from ATH in real time — instantly telling you where you stand in the pullback structure.
Trend Leg %:
Measures the current price move from the last weekly pivot low (when near ATH) or pivot high (when in correction). Displayed directly on the ATH label — showing how extended the current leg is and whether a continuation or reversal is more likely.
---
Key features:
- Analysis mode — reveals all colored level lines and tolerance boxes simultaneously for detailed review
- Anti-spam pivot engine — alerts fire once per confirmed pivot leg
- Individual and master alert system for every level
- Fully customizable colors, widths, and tolerances per level
---
Alert types (per level):
- Near — price approaching within tolerance zone
- Touch — price has intersected the level
- Over — price has broken above tolerance zone after a touch
- Under — price has broken below tolerance zone after a touch
---
How to use:
- On Daily chart — use levels for swing and long term entry planning with pyramiding
- On 1H chart — combine with Bias indicator verdicts for higher conviction entries
- Now label gives instant ATH distance context at a glance
- Trend Leg % on ATH label helps identify overextended moves before reversals
All-time high distance tracker with dynamic tolerance zones, trend leg measurement, and precision alerts for SPY pullback and correction entries.
---
What it does:
ATH Levels automatically tracks the all-time high price and plots key percentage retracement levels below it. Each level represents a statistically significant support zone where SPY has historically shown mean reversion behavior — making them ideal reference points for swing and long term entry planning.
Key levels:
- ATH — current all-time high with days elapsed counter
- -3% / -4% — shallow pullback zones, first reaction levels
- -5% — standard pullback threshold, high probability bounce zone
- -10% — correction territory entry zone
- -15% / -20% — deep correction zones, high conviction long term entries
- -25% — bear market territory (disabled by default)
Dynamic tolerance zones:
Only the two nearest levels to current price show active tolerance bands — keeping the chart clean while highlighting exactly where price is most likely to react. Tolerance is tighter near ATH (-3%/-4% = 0.20%) and wider at deeper levels (0.30%).
Now label:
A floating label at current price shows exact distance from ATH in real time — instantly telling you where you stand in the pullback structure.
Trend Leg %:
Measures the current price move from the last weekly pivot low (when near ATH) or pivot high (when in correction). Displayed directly on the ATH label — showing how extended the current leg is and whether a continuation or reversal is more likely.
---
Key features:
- Analysis mode — reveals all colored level lines and tolerance boxes simultaneously for detailed review
- Anti-spam pivot engine — alerts fire once per confirmed pivot leg
- Individual and master alert system for every level
- Fully customizable colors, widths, and tolerances per level
---
Alert types (per level):
- Near — price approaching within tolerance zone
- Touch — price has intersected the level
- Over — price has broken above tolerance zone after a touch
- Under — price has broken below tolerance zone after a touch
---
How to use:
- On Daily chart — use levels for swing and long term entry planning with pyramiding
- On 1H chart — combine with Bias indicator verdicts for higher conviction entries
- Now label gives instant ATH distance context at a glance
- Trend Leg % on ATH label helps identify overextended moves before reversals
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。