OPEN-SOURCE SCRIPT

Adaptive Volatility-Scaled Oscillator [AVSO] (Zeiierman)

█ Overview

The Adaptive Volatility-Scaled Oscillator (AVSO) is a dynamic trading indicator that measures and visualizes volatility-adjusted market behavior. By scaling various metrics (such as volume, price changes, standard deviation, ATR, and Yang-Zhang volatility) and applying adaptive smoothing, AVSO helps traders identify market conditions where volatility deviates significantly from the norm.

This indicator uses standardized scaling (Z-Score logic) to highlight periods of abnormally high or low volatility relative to recent history. With gradient coloring and clear volatility zones, AVSO provides a visually intuitive way to analyze market volatility and adapt trading strategies accordingly.

cuplikan

█ How It Works

Scaling Metrics: The indicator scales user-selected metrics (e.g., volume, ATR, standard deviation) relative to the market and price, providing a standardized volatility measure.

Z-Score Standardization: The scaled metric is normalized using a Z-Score to measure how far current volatility deviates from its recent mean.
  • Positive Z-Score: Above-average volatility.
  • Negative Z-Score: Below-average volatility.

Adaptive Smoothing: An Adaptive EMA smooths the Z-Score, dynamically adjusting its length based on the strength of the volatility. Stronger deviations result in shorter smoothing, increasing responsiveness.

Unique Feature: Yang-Zhang Volatility

The Yang-Zhang volatility estimator sets this indicator apart by providing a more robust and accurate measure of volatility compared to traditional methods like ATR or standard deviation.

What Makes Yang-Zhang Volatility Unique?
  • Comprehensive Calculation: It combines overnight price gaps (log returns from the previous close to the current open) and intraday price movements (high, low, and close).
  • Accurate for Gapped Markets: Traditional volatility measures can misrepresent price movement when significant gaps occur between sessions. Yang-Zhang accounts for these gaps, making it highly reliable for assets prone to overnight price jumps, such as stocks, cryptocurrencies, and futures.
  • Adaptable to Real Market Conditions: By including both close-to-open returns and intraday volatility, it provides a balanced and adaptive measure that captures the full volatility picture.


Why This Matters to Traders
  • Better Volatility Insights: Yang-Zhang offers a clearer view of true market volatility, especially in markets with price gaps or uneven trading sessions.
  • Improved Trade Timing: By identifying volatility spikes and calm periods more effectively, traders can time their entries and exits with greater confidence.



█ How to Use

Identify High and Low Volatility
  • A high Z-Score (>2) indicates significant market volatility. This can signal momentum-driven moves, breakouts, or areas of increased risk.
  • A low Z-Score (<-2) suggests low volatility or a calm market environment. This often occurs before a potential breakout or reversal.


cuplikan

Trade Signals
  • High Volatility Zones (background highlight): Monitor for potential breakouts, trend continuations, or reversals.
  • Low Volatility Zones: Anticipate range-bound conditions or upcoming volatility spikes.


cuplikan


█ Settings
  • Source: Select the price source for scaling calculations (close, high, low, open).
  • Metric Measure: Choose the volatility measure:

    Volume: Scales raw volume.
    Close: Uses closing price changes.
    Standard Deviation: Price dispersion.
    ATR: Average True Range.
    Yang: Yang-Zhang volatility estimate.

  • Bars to Analyze: Number of historical bars used to calculate the mean and standard deviation of the scaled metric.
  • ATR / Standard Deviation Period: Lookback period for ATR or Standard Deviation calculation.
  • Yang Volatility Period: Period for the Yang-Zhang volatility estimator.
  • Smoothing Period: Base smoothing length for the adaptive smoothing line.


-----------------
Disclaimer

The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.

All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.

My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
adaptivevolatilityVolatilityvolatilityindicatorvolatilityoscillatorvolatilitystrategyvolatilitytradingVolumeyangzhangyangzhangvolatility

Skrip open-source

Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Hormat untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Inggin menggunakan skrip ini pada chart?

Pernyataan Penyangkalan