OPEN-SOURCE SCRIPT

Volume Weighted Average Price

155
This indicator provides an implementation of the Volume Weighted Average Price (VWAP), extended with layered standard deviation bands that decompose total market volatility relative to the VWAP anchor period.

Key Features:

Volatility Decomposition: The indicator's primary feature is its ability to separate volatility, controlled by the 'Estimate Bar Statistics' option.

Standard Mode (Estimate Bar Statistics = OFF): Plots a single set of bands representing the standard deviation of the Source price relative to the VWAP.

Decomposition Mode (Estimate Bar Statistics = ON): The indicator uses a statistical model ('Estimator') to calculate within-bar volatility. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used instead). This mode displays two sets of bands:

Inner Bands: Show only the contribution of the 'between-bar' volatility.

Outer Bands: Show the total volatility (the sum of between-bar and within-bar components).

Periodic & Customizable Anchor: The VWAP calculation is session-based and resets at the beginning of a new period. The anchor timeframe (Anchor Timeframe) can be detected automatically (e.g., 'Session', 'Week') or specified manually.

Weighting Mechanism: The indicator has two levels of weighting:

The baseline is always a VWAP (Volume-Weighted Average Price).

The Volume weighted input additionally applies volume weighting to the volatility (standard deviation) calculation for the bands.

Multi-Timeframe (MTF) Engine: The indicator includes an MTF conversion block. When a Higher Timeframe (HTF) is selected, advanced options become available: Fill Gaps handles data gaps, and Wait for timeframe to close prevents repainting by ensuring the indicator only updates when the HTF bar closes.

Integrated Alerts: Includes a full set of built-in alerts for the source price crossing over or under the central VWAP line and the outermost calculated volatility band.

DISCLAIMER

For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.

Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.

No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.

No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.

Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน