OPEN-SOURCE SCRIPT

UVR Channels

已更新
UVR CHANNELS: A VOLATILITY-BASED TREND ANALYSIS TOOL

PURPOSE
UVR Channels are designed to dynamically measure market volatility and identify key price levels for potential trend reversals. The channels are calculated using a unique volatility formula(UVR) combined with an EMA as the central reference point. This approach provides traders with a tool for evaluating trends, reversals, and market conditions such as breakouts or consolidations.

CALCULATION MECHANISM

1. Ultimate Volatility Rate (UVR) Calculation:
The UVR is a custom measure of volatility that highlights significant price movements by comparing the extremes of current and previous candles.

Volatility Components:
Two values are calculated to represent potential price fluctuations:
The absolute difference between the current candle's high and the previous candle's low:

Volatility Component 1=∣high−low[1]∣

The absolute difference between the previous candle's high and the current candle's low:

Volatility Component 2=∣high[1]−low∣

Volatility Ratio:
The larger of the two components is selected as the Volatility Ratio, ensuring the UVR captures the most significant movement:

Volatility Ratio=max⁡(Volatility Component 1,Volatility Component 2)

Smoothing with SMMA:
To stabilize the volatility calculation, the Volatility Ratio is smoothed using a Smoothed Moving Average (SMMA) over a user-defined period (e.g., 14 candles):

UVR= (UVR(Previous) × (Period−1))+Volatility Ratio)/Period

2. Band Construction:
The UVR is integrated into the band calculations by using the Exponential Moving Average (EMA) as the central line:

Central Line (EMA):
The EMA is calculated based on closing prices over a user-defined period (e.g., 20 candles).

Upper Band:
The upper band represents a dynamic resistance level, calculated as:

Upper Band=EMA+(UVR × Multiplier)

Lower Band:
The lower band serves as a dynamic support level, calculated as:

Lower Band=EMA−(UVR × Multiplier)

3. Role of the Multiplier:
The Multiplier adjusts the width of the bands based on trader preferences:

Higher Multiplier: Wider bands to capture larger price swings.
Lower Multiplier: Narrower bands for tighter market analysis.

FEATURES AND USAGE

Dynamic Volatility Analysis:
The UVR Channels expand and contract based on real-time market volatility, offering a dynamic framework for identifying potential price trends.
Expanding Bands: High market volatility.
Contracting Bands: Low volatility or consolidation.

Trend Identification:
Price consistently near the upper band indicates a strong bullish trend.
Price near the lower band signals a bearish trend.

Trend Reversal Signals:
Price reaching the upper band may signal overbought conditions, while price touching the lower band may signal oversold conditions.

Breakout Potential:
Narrow bands often precede significant price breakouts, making UVR Channels a useful tool for spotting early breakout conditions.

DIFFERENCES FROM BOLLINGER BANDS
Unlike Bollinger Bands, which rely on standard deviation to measure volatility, the UVR Channels use a custom volatility formula based on price extremes (highs and lows). This approach adapts to market behaviour in a unique way, providing traders with an alternative and accurate view of volatility and trends.

INPUT PARAMETERS

Volatility Period:
Determines the number of periods used to smooth the volatility ratio. A higher value results in smoother bands but may lag behind sudden market changes.

EMA Period:
Controls the calculation of the central reference line.

Multiplier:
Adjusts the width of the bands. Increasing the multiplier widens the bands, capturing larger price movements, while decreasing it narrows the bands for tighter analysis.

VISUALIZATION

Purple Line: The EMA (central line).
Red Line: Upper band (dynamic resistance).
Green Line: Lower band (dynamic support).
Shaded Area: Fills the space between the upper and lower bands, visually highlighting the channel.
發布通知
Default Values are updated
Bollinger Bands (BB)Exponential Moving Average (EMA)Volatility

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?


更多:

免責聲明