PROTECTED SOURCE SCRIPT
已更新

ATR Ratio

25
# ATR Ratio Indicator Documentation

## 📊 Indicator Overview

**ATR Ratio** is a technical analysis tool designed to measure the relative strength of market volatility changes. By calculating the ratio between short-term and long-term ATR (Average True Range), traders can quickly identify whether market volatility is accelerating or decelerating.

---

## 🎯 Core Features

This indicator displays two main lines in a separate window:

1. **ATR Ratio Line** (Red): Short-term ATR ÷ Long-term ATR
2. **Trigger Level Line** (Blue): Reference level at default 0.87
3. **1.0 Reference Line** (Gray Dotted): Critical point where volatility is equal

---

## ⚙️ Parameter Settings

| Parameter Name | Default | Description | Suggested Range |
|---------------|---------|-------------|-----------------|
| **Short-term ATR Period** | 7 | Number of bars for short-term volatility | 5-14 |
| **Long-term ATR Period** | 49 | Number of bars for long-term volatility | 30-100 |
| **Trigger Level** | 0.87 | Reference threshold for strategy signals | 0.5-1.0 |

---

## 📈 Interpretation Guide

### Understanding ATR Ratio

- **Ratio > 1.0**: Short-term volatility **exceeds** long-term volatility
- Market volatility is **accelerating**
- May signal trend initiation or breakout

- **Ratio < 1.0**: Short-term volatility **below** long-term volatility
- Market volatility is **decelerating**
- May signal consolidation or trend exhaustion

- **Ratio near Trigger Level (0.87)**:
- Significant volatility contraction
- Potential **quiet period** before breakout
- Good time to prepare entries or set alerts

### Visual Signals

```
┌────────────────────────────────────┐
│ ATR Ratio │
├────────────────────────────────────┤
│ 1.5 ┼ ╱╲ │ ← Volatility Expanding
│ │ ╱ ╲ │
│ 1.0 ┼─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ ← Reference Line
│ │ ╱ ╲ │
│ 0.87┼─────────────────────────────│ ← Trigger Level
│ │ ╱ ╲ │
│ 0.5 ┼ │ ← Volatility Contracting
└────────────────────────────────────┘
```


# ATR Ratio 指標說明

## 📊 指標概述

**ATR Ratio**(ATR 比率指標)是一個技術分析工具,用於衡量市場波動性的相對變化強度。透過計算短期與長期 ATR(平均真實波幅)的比率,交易者可以快速識別市場波動性是否在加速或減速。

---

## 🎯 核心功能

此指標在獨立視窗中顯示兩條主要線:

1. **ATR 比率線**(紅色):短期 ATR ÷ 長期 ATR
2. **觸發水平線**(藍色):預設為 0.87 的參考水平
3. **1.0 參考線**(灰色虛線):標示波動性相等的臨界點

---

## ⚙️ 參數設定

| 參數名稱 | 預設值 | 說明 | 建議範圍 |
|---------|-------|------|---------|
| **短期 ATR 週期** | 7 | 計算短期波動性的 K 線數量 | 5-14 |
| **長期 ATR 週期** | 49 | 計算長期波動性的 K 線數量 | 30-100 |
| **觸發水平線** | 0.87 | 策略訊號的參考閾值 | 0.5-1.0 |

---

## 📈 指標解讀

### ATR 比率的意義

- **比率 > 1.0**:短期波動性**大於**長期波動性
- 市場波動正在**加速**
- 可能預示趨勢啟動或突破

- **比率 < 1.0**:短期波動性**小於**長期波動性
- 市場波動正在**減速**
- 可能預示盤整或趨勢衰竭

- **比率接近觸發水平(0.87)**:
- 波動性顯著收斂
- 可能是突破前的**靜默期**
- 適合準備進場或設定警報

### 視覺訊號

```
┌────────────────────────────────────┐
│ ATR Ratio │
├────────────────────────────────────┤
│ 1.5 ┼ ╱╲ │ ← 波動加速
│ │ ╱ ╲ │
│ 1.0 ┼─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ ← 參考線
│ │ ╱ ╲ │
│ 0.87┼─────────────────────────────│ ← 觸發水平
│ │ ╱ ╲ │
│ 0.5 ┼ │ ← 波動收斂
└────────────────────────────────────┘
```

---

## 💡 實戰應用

### 1️⃣ 突破前兆識別
當 ATR 比率長時間維持在 **0.6-0.8** 區間,代表市場進入低波動壓縮狀態,通常預示即將發生大幅突破。

**操作策略**:
- 在比率低於 0.87 時設定價格突破警報
- 等待比率快速上升至 1.0 以上時確認突破
- 順勢進場

### 2️⃣ 趨勢強度確認
觀察比率在趨勢中的表現:
- **強勢趨勢**:比率持續維持在 1.0 以上
- **弱勢趨勢**:比率雖大於 1.0 但持續下降
- **趨勢衰竭**:比率跌破 1.0 並持續下滑

### 3️⃣ 風險管理工具
使用 ATR 比率調整部位規模:
- 比率 > 1.2:減少部位(高波動風險)
- 比率 0.8-1.2:正常部位
- 比率 < 0.8:可考慮增加部位(低波動期)

---

## 🔧 使用建議

### 最佳實踐
✅ **結合其他指標**:與價格行為、支撐阻力配合使用
✅ **設定警報**:在觸發水平線處設定警報通知
✅ **多時間框架分析**:同時觀察日線、4 小時線的 ATR 比率
✅ **回測驗證**:根據不同商品調整參數

### 注意事項
⚠️ **不適用於極低波動市場**:如假日或流動性極差時段
⚠️ **需結合價格分析**:單獨使用可能產生假訊號
⚠️ **參數需優化**:不同商品可能需要不同的週期設定


## 🎓 進階應用

### 與其他指標結合

1. **ATR Ratio + 布林通道**
- 布林通道收縮 + ATR 比率 < 0.87 → 高機率突破設定

2. **ATR Ratio + RSI**
- RSI 超買/超賣 + ATR 比率快速上升 → 反轉訊號增強

3. **ATR Ratio + 移動平均**
- 價格突破均線 + ATR 比率 > 1.0 → 趨勢確認



## 📞 常見問題

**Q: 為什麼觸發水平預設是 0.87?**
A: 這是原始指標作者的經驗值,代表波動性顯著收斂的閾值。您可以根據交易商品和策略調整。

**Q: 短期和長期週期應該如何設定?**
A: 預設 7 和 49 適用於日線交易。短線交易者可使用 5/21,波段交易者可使用 14/50。

**Q: 比率可以大於 2.0 嗎?**
A: 可以。極端市場事件(如重大新聞)可能導致比率飆升至 2.0 以上,代表波動性劇烈擴張。



**提示**:建議先在模擬帳戶測試策略,確認參數適合您的交易風格後再實盤使用。
發行說明
## 📊 指標概述

**ATR Ratio**(ATR 比率指標)是一個技術分析工具,用於衡量市場波動性的相對變化強度。透過計算短期與長期 ATR(平均真實波幅)的比率,交易者可以快速識別市場波動性是否在加速或減速。

---

## 🎯 核心功能

此指標在獨立視窗中顯示兩條主要線:

1. **ATR 比率線**(紅色):短期 ATR ÷ 長期 ATR
2. **觸發水平線**(藍色):預設為 0.87 的參考水平
3. **1.0 參考線**(灰色虛線):標示波動性相等的臨界點

---

## ⚙️ 參數設定

| 參數名稱 | 預設值 | 說明 | 建議範圍 |
|---------|-------|------|---------|
| **短期 ATR 週期** | 7 | 計算短期波動性的 K 線數量 | 5-14 |
| **長期 ATR 週期** | 49 | 計算長期波動性的 K 線數量 | 30-100 |
| **觸發水平線** | 0.87 | 策略訊號的參考閾值 | 0.5-1.0 |
| **觸發條件包含等於** | 停用 | 停用時:前一根 < 觸發水平<br>啟用時:前一根 <= 觸發水平 | - |

---

## 🔔 波動升高警示功能

### 自動警報觸發

當 ATR 比率從低於觸發水平(預設 0.87)突破至高於觸發水平時,指標會自動提供以下提示:

#### 視覺標記

1. **指標視窗標記**:
- 在 ATR_Ratio 線的穿越點下方顯示綠色向上箭頭 ⬆️
- 標記位置:穿越點數值的 95%(稍微下方,避免遮擋線條)

2. **主圖背景提示**:
- 對應 K 棒的背景加上半透明黃色(透明度 90%)
- 提供跨視窗的視覺關聯

#### 警報通知

- **觸發條件**:ATR 比率向上穿越觸發水平線
- **訊息內容**:「Atr波動升高提醒」
- **觸發頻率**:每根 K 棒最多觸發一次(避免重複通知)

### 參數設定

| 參數名稱 | 預設值 | 說明 |
|---------|-------|------|
| **觸發條件包含等於** | 停用 | **停用時**(預設):當前一根 < 觸發水平且當前根 > 觸發水平時觸發<br>**啟用時**:當前一根 ≤ 觸發水平且當前根 > 觸發水平時觸發 |

## 📊 Indicator Overview

**ATR Ratio** is a technical analysis tool designed to measure the relative strength of market volatility changes. By calculating the ratio between short-term and long-term ATR (Average True Range), traders can quickly identify whether market volatility is accelerating or decelerating.

---

## 🎯 Core Features

This indicator displays two main lines in a separate window:

1. **ATR Ratio Line** (Red): Short-term ATR ÷ Long-term ATR
2. **Trigger Level Line** (Blue): Reference level at default 0.87
3. **1.0 Reference Line** (Gray Dotted): Critical point where volatility is equal

---

## ⚙️ Parameter Settings

| Parameter Name | Default | Description | Suggested Range |
|---------------|---------|-------------|-----------------|
| **Short-term ATR Period** | 7 | Number of bars for short-term volatility | 5-14 |
| **Long-term ATR Period** | 49 | Number of bars for long-term volatility | 30-100 |
| **Trigger Level** | 0.87 | Reference threshold for strategy signals | 0.5-1.0 |
| **Include Equal in Trigger** | Disabled | Disabled: Previous bar < Trigger Level<br>Enabled: Previous bar <= Trigger Level | - |

---

## 🔔 Volatility Breakout Alert System

### Automatic Alert Triggering

When the ATR ratio crosses above the trigger level (default 0.87), the indicator automatically provides the following notifications:

#### Visual Markers

1. **Indicator Window Marker**:
- Green upward arrow ⬆️ displayed below the crossover point on the ATR_Ratio line
- Marker position: 95% of crossover value (slightly below to avoid obscuring the line)

2. **Main Chart Background**:
- Corresponding candlestick background highlighted with semi-transparent yellow (90% transparency)
- Provides cross-pane visual correlation

#### Alert Notifications

- **Trigger Condition**: ATR ratio crosses above the trigger level line
- **Message Content**: "Atr波動升高提醒" (ATR Volatility Rising Alert)
- **Trigger Frequency**: Maximum once per bar (prevents duplicate notifications)

### Parameter Settings

| Parameter Name | Default | Description |
|---------------|---------|-------------|
| **Include Equal in Trigger** | Disabled | **Disabled** (default): Triggers when previous bar < trigger level AND current bar > trigger level<br>**Enabled**: Triggers when previous bar ≤ trigger level AND current bar > trigger level |

### Setting Up TradingView Alerts

1. Add the ATR Ratio indicator to your chart
2. Click the "Alarm Clock" icon ⏰ in the top-right corner
3. In the "Condition" dropdown, select: **ATR Ratio** → **ATR 波動升高警示**
4. Confirm the message displays: "Atr波動升高提醒"
5. Configure notification methods:
- ✅ Show popup notification
- ✅ Play sound
- ✅ Send to Email
- ✅ Send to mobile app
- ✅ Webhook (for advanced users to integrate third-party systems)
6. Click "Create" to complete setup

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。