OPEN-SOURCE SCRIPT
Pullback Levels from ATH

# ATH Pullback Levels  
**Assess correction depth with precision – 5%, 10%, 15%, 20% below All-Time High**
---
### Overview
This indicator draws **horizontal support lines** at **5%, 10%, 15%, and 20%** below the **All-Time High (ATH)** of any asset. Perfect for **swing traders**, **long-term investors**, and **bull market participants** who want to:
- Measure **pullback depth** in real-time
- Identify **potential support zones**
- Set **alerts** when price enters key retracement levels
---
### Features
| Feature | Description |
|--------|-------------|
| **Dynamic ATH Tracking** | Automatically updates with every new high |
| **4 Pullback Levels** | 5%, 10%, 15%, 20% below ATH |
| **Live Pullback % Label** | Shows current % drop from ATH (top-right) |
| **Customizable Lines** | Toggle visibility, change colors & styles |
| **Built-in Alerts** | Trigger on entry into each zone |
| **No Errors** | Works on 50k+ bar charts (BTC, SPX, etc.) |
| **Time-Based Lines** | Uses `xloc.bar_time` – no 500-bar future limit |
---
### How to Use
1. Apply to any chart (stocks, crypto, forex, indices)
2. Watch the **info box** for current pullback %
3. Use lines as **potential buy zones** during corrections
4. Set **alerts** to be notified when price enters a level
> Example: If ATH = $100 →
> - 5% = $95
> - 10% = $90
> - 15% = $85
> - 20% = $80
---
### Inputs
- **Show 5% / 10% / 15% / 20% Level** → Toggle on/off
- **Line Colors** → Fully customizable
- **Line Style** → Solid, Dashed, or Dotted
---
### Alerts
Create alerts directly from the indicator:
- `"Entered 5% Pullback"`
- `"Entered 10% Pullback"`
- etc.
---
### Best For
- Bull market corrections
- Long-term position sizing
- Risk management in uptrends
- Swing entries on dips
---
### Notes
- Works on **all timeframes**
- **Log scale compatible** (lines adjust correctly)
- No repainting – ATH only updates on confirmed highs
---
**Built with Pine Script v6 – Clean, fast, reliable.**
*Happy trading!*
**Assess correction depth with precision – 5%, 10%, 15%, 20% below All-Time High**
---
### Overview
This indicator draws **horizontal support lines** at **5%, 10%, 15%, and 20%** below the **All-Time High (ATH)** of any asset. Perfect for **swing traders**, **long-term investors**, and **bull market participants** who want to:
- Measure **pullback depth** in real-time
- Identify **potential support zones**
- Set **alerts** when price enters key retracement levels
---
### Features
| Feature | Description |
|--------|-------------|
| **Dynamic ATH Tracking** | Automatically updates with every new high |
| **4 Pullback Levels** | 5%, 10%, 15%, 20% below ATH |
| **Live Pullback % Label** | Shows current % drop from ATH (top-right) |
| **Customizable Lines** | Toggle visibility, change colors & styles |
| **Built-in Alerts** | Trigger on entry into each zone |
| **No Errors** | Works on 50k+ bar charts (BTC, SPX, etc.) |
| **Time-Based Lines** | Uses `xloc.bar_time` – no 500-bar future limit |
---
### How to Use
1. Apply to any chart (stocks, crypto, forex, indices)
2. Watch the **info box** for current pullback %
3. Use lines as **potential buy zones** during corrections
4. Set **alerts** to be notified when price enters a level
> Example: If ATH = $100 →
> - 5% = $95
> - 10% = $90
> - 15% = $85
> - 20% = $80
---
### Inputs
- **Show 5% / 10% / 15% / 20% Level** → Toggle on/off
- **Line Colors** → Fully customizable
- **Line Style** → Solid, Dashed, or Dotted
---
### Alerts
Create alerts directly from the indicator:
- `"Entered 5% Pullback"`
- `"Entered 10% Pullback"`
- etc.
---
### Best For
- Bull market corrections
- Long-term position sizing
- Risk management in uptrends
- Swing entries on dips
---
### Notes
- Works on **all timeframes**
- **Log scale compatible** (lines adjust correctly)
- No repainting – ATH only updates on confirmed highs
---
**Built with Pine Script v6 – Clean, fast, reliable.**
*Happy trading!*
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
