OPEN-SOURCE SCRIPT
已更新 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.
版本注释
added weekly开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。