OPEN-SOURCE SCRIPT

Curved Price Channels (Zeiierman)

Overview
The Curved Price Channels (Zeiierman) is designed to plot dynamic channels around price movements, much like the traditional Donchian Channels, but with a key difference: the channels are curved instead of straight. This curvature allows the channels to adapt more fluidly to price action, providing a smoother representation of the highest high and lowest low levels.

Just like Donchian Channels, the Curved Price Channels help identify potential breakout points and areas of trend reversal. However, the curvature offers a more refined approach to visualizing price boundaries, making it potentially more effective in capturing price trends and reversals in markets that exhibit significant volatility or price swings.

The included trend strength calculation further enhances the indicator by offering insight into the strength of the current trend.
captura

How It Works
The Curved Price Channels are calculated based on the asset's average true range (ATR), scaled by the chosen length and multiplier settings. This adaptive size allows the channels to expand and contract based on recent market volatility. The central trendline is calculated as the average of the upper and lower curved bands, providing a smoothed representation of the overall price trend.

Key Calculations:
  • Adaptive Size: The ATR is used to dynamically adjust the width of the channels, making them responsive to changes in market volatility.
  • Upper and Lower Bands: The upper band is calculated by taking the maximum close value and adjusting it downward by a factor proportional to the ATR and the multiplier. Similarly, the lower band is calculated by adjusting the minimum close value upward.
  • Trendline: The trendline is the average of the upper and lower bands, representing the central tendency of the price action.


Trend Strength
The Trend Strength feature in the Curved Price Channels is a powerful feature designed to help traders gauge the strength of the current trend. It calculates the strength of a trend by analyzing the relationship between the price's position within the curved channels and the overall range of the channels themselves.

Range Calculation:
The indicator first determines the distance between the upper and lower curved channels, known as the range. This range represents the overall volatility of the price within the given period.


Relative Position:
The next step involves calculating the relative position of the closing price within this range. This value indicates where the current price sits in relation to the overall range.


Normalization:
To assess the trend strength over time, the current range is normalized against the maximum and minimum ranges observed over a specified look-back period.


Trend Strength Calculation:
The final Trend Strength is calculated by multiplying the relative position by the normalized range and then scaling it to a percentage.


This approach ensures that the Trend Strength not only reflects the direction of the trend but also its intensity, providing a more comprehensive view of market conditions.


Comparison with Donchian Channels
Curved Price Channels offer several advantages over Donchian Channels, particularly in their ability to adapt to changing market conditions.

Adaptability vs. Fixed Structure
  • Donchian Channels: Use a fixed period to plot straight lines based on the highest high and lowest low. This can be limiting because the channels do not adjust to volatility; they remain the same width regardless of how much or how little the price is moving.
  • Curved Price Channels: Adapt dynamically to market conditions using the Average True Range (ATR) as a measure of volatility. The channels expand and contract based on recent price movements, providing a more accurate reflection of the market's current state. This adaptability allows traders to capture both large trends and smaller fluctuations more effectively.


Sensitivity to Market Movements
  • Donchian Channels: Are less sensitive to recent price action because they rely on a fixed look-back period. This can result in late signals during fast-moving markets, as the channels may not adjust quickly enough to capture new trends.
  • Curved Price Channels: Respond more quickly to changes in market volatility, making them more sensitive to recent price action. The multiplier setting further allows traders to adjust the channel's sensitivity, making it possible to capture smaller price movements during periods of low volatility or filter out noise during high volatility.


Enhanced Trend Strength Analysis
  • Donchian Channels: Do not provide direct insight into the strength of a trend. Traders must rely on additional indicators or their judgment to gauge whether a trend is strong or weak.
  • Curved Price Channels: Includes a built-in trend strength calculation that takes into account the distance between the upper and lower channels relative to the trendline. A broader range between the channels typically indicates a stronger trend, while a narrower range suggests a weaker trend. This feature helps traders not only identify the direction of the trend but also assess its potential longevity and strength.


Dynamic Support and Resistance
  • Donchian Channels: Offer static support and resistance levels that may not accurately reflect changing market dynamics. These levels can quickly become outdated in volatile markets.
  • Curved Price Channels: Offer dynamic support and resistance levels that adjust in real-time, providing more relevant and actionable trading signals. As the channels curve to reflect price movements, they can help identify areas where the price is likely to encounter support or resistance, making them more useful in volatile or trending markets.

captura

How to Use
Traders can use the Curved Price Channels in similar ways to Donchian Channels but with the added benefits of the adaptive, curved structure:

Breakout Identification:
Just like Donchian Channels, when the price breaks above the upper curved band, it may signal the start of a bullish trend, while a break below the lower curved band could indicate a bearish trend. The curved nature of the channels helps in capturing these breakouts more precisely by adjusting to recent volatility.
captura

Volatility:
The width of the price channels in the Curved Price Channels indicator serves as a clear indicator of current market volatility. A wider channel indicates that the market is experiencing higher volatility, as prices are fluctuating more dramatically within the period. Conversely, a narrower channel suggests that the market is in a lower volatility state, with price movements being more subdued.

Typically, higher volatility is observed during negative trends, where market uncertainty or fear drives larger price swings. In contrast, lower volatility is often associated with positive trends, where prices tend to move more steadily and predictably. The adaptive nature of the Curved Price Channels reflects these volatility conditions in real time, allowing traders to assess the market environment quickly and adjust their strategies accordingly.
captura

Support and Resistance:
The trend line act as dynamic support and resistance levels. Due to it's adaptive nature, this level is more reflective of the current market environment than the fixed level of Donchian Channels.
captura

Trend Direction and Strength:
The trend direction and strength are highlighted by the trendline and the directional candle within the Curved Price Channels indicator. If the price is above the trendline, it indicates a positive trend, while a price below the trendline signals a negative trend. This directional bias is visually represented by the color of the directional candle, making it easy for traders to quickly identify the current market trend.

In addition to the trendline, the indicator also displays Max and Min values. These represent the highest and lowest trend strength values within the lookback period, providing a reference point for understanding the current trend strength relative to historical levels.
  • Max Value: Indicates the highest recorded trend strength during the lookback period. If the Max value is greater than the Min value, it suggests that the market has generally experienced more positive (bullish) conditions during this time frame.
  • Min Value: Represents the lowest recorded trend strength within the same period. If the Min value is greater than the Max value, it indicates that the market has been predominantly negative (bearish) over the lookback period.

By assessing these Max and Min values, traders gain an immediate understanding of the underlying trend. If the current trend strength is close to the Max value, it indicates a strong bullish trend. Conversely, if the trend strength is near the Min value, it suggests a strong bearish trend.
captura

Settings
  • Trend Length: Defines the number of bars used to calculate the core trendline and adaptive size. A length of 200 will create a smooth, long-term trendline that reacts slowly to price changes, while a length of 20 will create a more responsive trendline that tracks short-term movements.
  • Multiplier: Adjusts the width of the curved price channels. A higher value tightens the channels, making them more sensitive to price movements, while a lower value widens the channels. A multiplier of 10 will create tighter channels that are more sensitive to minor price fluctuations, which is useful in low-volatility markets. A multiplier of 2 will create wider channels that capture larger trends and are better suited for high-volatility markets.
  • Trend Strength Length: Defines the period over which the maximum and minimum ranges are calculated to normalize the trend strength. A length of 200 will smooth out the trend strength readings, providing a stable indication of trend health, whereas a length of 50 will make the readings more reactive to recent price changes.



-----------------
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!
Bands and ChannelscurvedpricecurvedpricechannelscurvedtrendlinedonchianchannelDonchian Channels (DC)dynamicpricebandspricebandsTrend Analysistrendstrengthtrendstrengthmetervolatilitybands

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal