OPEN-SOURCE SCRIPT
Cập nhật X AVWAP DSO

A powerful, non-overlay momentum indicator designed to measure the relationship between current price action and key Volume Weighted Average Price (VWAP) structures. It provides traders with a refined, configurable view of momentum by combining the **magnitude of price separation** with the **trend momentum** of the volume anchor.
---
### Core Calculation and Principle
This oscillator moves beyond simple price-vs-average separation by integrating the momentum (slope) of the volume average itself. The indicator is built around two primary components:
1. **Distance (D):** This is the magnitude of separation, calculated as the difference between the **closing price** and the selected **AVWAP Anchor Source** ($D = \text{Close} - \text{AVWAP}$).
2. **Slope (S):** This represents the **trend momentum** of the VWAP, calculated as the change in the smoothed AVWAP over a defined lookback period.
The final oscillator value is determined by the selected **Combination Method**, giving the user control over how these two factors interact:
* **Addition (Baseline):** The oscillator value is $D + S$. This provides a balanced view where the price separation is slightly adjusted by the VWAP's momentum.
* **Weighted Addition:** The oscillator value is $D + (S \times \text{Weight})$. This is a powerful feature that **allows the user to prioritize the impact of the Slope (trend momentum) over the Distance (magnitude)** using a customizable multiplier called the **Slope Weight**.
---
### Customization and Flexibility
The indicator's value lies in its deep configurability, allowing it to adapt to different trading strategies and timeframes:
* **AVWAP Anchor Source:** You can toggle between two critical VWAP reset structures for context:
* **4H Session VWAP:** Uses fixed, sequential 4-hour VWAP segments (e.g., 18:00, 22:00 NY Time) for tracking short-term structural shifts.
* **Daily AVWAP (ETH 18:00):** Uses a single, continuous VWAP anchored from the Electronic Trading Hours (ETH) open at 18:00 NY Time, providing a broader, sustained volume-weighted average context.
* **VWAP Price Source:** The underlying price used to calculate the VWAP itself is selectable (options include Close, OHLC4, HLC3, Open, High, and Low).
* **Plot Style:** Toggle between a continuous **Line** plot (for tracking fine movements) and a color-coded **Histogram** (for clear magnitude and directional reading, with Blue for positive and Red for negative).
### Trading Application
The AVWAP Distance & Slope Oscillator is a sophisticated tool best used to identify:
* **Zero-Line Crosses:** Signifying price crossing the underlying volume anchor while accounting for the anchor's own momentum.
* **Momentum Confirmation:** A high positive reading indicates price is strongly above the VWAP, and the VWAP itself is actively rising (strong bullish momentum).
* **Filtered Signals:** By adjusting the **Slope Weight** (in the Weighted Addition method), traders can amplify signals when the structural trend (VWAP slope) is strong, helping to filter out minor price fluctuations that occur when the VWAP is relatively flat.
---
### Core Calculation and Principle
This oscillator moves beyond simple price-vs-average separation by integrating the momentum (slope) of the volume average itself. The indicator is built around two primary components:
1. **Distance (D):** This is the magnitude of separation, calculated as the difference between the **closing price** and the selected **AVWAP Anchor Source** ($D = \text{Close} - \text{AVWAP}$).
2. **Slope (S):** This represents the **trend momentum** of the VWAP, calculated as the change in the smoothed AVWAP over a defined lookback period.
The final oscillator value is determined by the selected **Combination Method**, giving the user control over how these two factors interact:
* **Addition (Baseline):** The oscillator value is $D + S$. This provides a balanced view where the price separation is slightly adjusted by the VWAP's momentum.
* **Weighted Addition:** The oscillator value is $D + (S \times \text{Weight})$. This is a powerful feature that **allows the user to prioritize the impact of the Slope (trend momentum) over the Distance (magnitude)** using a customizable multiplier called the **Slope Weight**.
---
### Customization and Flexibility
The indicator's value lies in its deep configurability, allowing it to adapt to different trading strategies and timeframes:
* **AVWAP Anchor Source:** You can toggle between two critical VWAP reset structures for context:
* **4H Session VWAP:** Uses fixed, sequential 4-hour VWAP segments (e.g., 18:00, 22:00 NY Time) for tracking short-term structural shifts.
* **Daily AVWAP (ETH 18:00):** Uses a single, continuous VWAP anchored from the Electronic Trading Hours (ETH) open at 18:00 NY Time, providing a broader, sustained volume-weighted average context.
* **VWAP Price Source:** The underlying price used to calculate the VWAP itself is selectable (options include Close, OHLC4, HLC3, Open, High, and Low).
* **Plot Style:** Toggle between a continuous **Line** plot (for tracking fine movements) and a color-coded **Histogram** (for clear magnitude and directional reading, with Blue for positive and Red for negative).
### Trading Application
The AVWAP Distance & Slope Oscillator is a sophisticated tool best used to identify:
* **Zero-Line Crosses:** Signifying price crossing the underlying volume anchor while accounting for the anchor's own momentum.
* **Momentum Confirmation:** A high positive reading indicates price is strongly above the VWAP, and the VWAP itself is actively rising (strong bullish momentum).
* **Filtered Signals:** By adjusting the **Slope Weight** (in the Weighted Addition method), traders can amplify signals when the structural trend (VWAP slope) is strong, helping to filter out minor price fluctuations that occur when the VWAP is relatively flat.
Phát hành các Ghi chú
added weeklyMã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.