OPEN-SOURCE SCRIPT

OA - Sigma Bands

1 650
Description:
The OA - Sigma Bands indicator is a fully adaptive, volatility-sensitive dynamic band system designed to detect price expansion and potential breakouts. Unlike traditional fixed-width Bollinger Bands, OA - Sigma Bands adjust their boundaries based on a combination of standard deviation (σ) and Average Daily Range (ADR), making them more responsive to real market behavior and shifts in volatility.

Key Concepts & Logic
This tool constructs three distinct band regions:

Sigma Bands (±σ):
Calculated using the standard deviation of the closing price over a user-defined lookback period. This acts as the core volatility filter to identify statistically significant price deviations.

ADR Zones (±ADR):
These zones provide an additional layer based on the percentage average of daily price ranges over the last 20 bars. They help visualize intraday or short-term expected volatility.

Dynamic Adjustment Logic:
When price breaks outside the upper/lower sigma or ADR boundaries for a defined number of bars (user input), the system recalibrates. This ensures that the bands evolve with volatility and don’t remain outdated in trending markets.

Inputs & Customization
Sigma Multiplier: Set how wide the sigma bands should be (default: 1.5).

Lookback Period: Controls how many bars are used to calculate the standard deviation (default: 200).

Break Confirmation Bars: Determines how many candles must close beyond a boundary to trigger band recalibration.

ADR Period: Internally fixed at 20 bars for stable short-term volatility measurement.

Full Color Customization: Customize the band colors and fill transparency to suit your chart style.

Benefits & Use Cases
Breakout Trading: Detect when price exits statistically significant ranges, confirming trend expansion.

Mean Reversion: Use the outer bands as potential reversion zones in sideways or low-volatility markets.

Volatility Awareness: Visually identify when price is compressed or expanding.

Dynamic Structure: The auto-updating nature makes it more reliable than static historical zones.

Overlay-Ready: Designed to sit directly on price charts with minimal clutter.

Disclaimer
This script is intended for educational and informational purposes only. It does not constitute investment advice, financial guidance, or a recommendation to buy or sell any security. Always perform your own research and apply proper risk management before making trading decisions.

If you enjoy this script or find it useful, feel free to give it or leave a comment!

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。