OPEN-SOURCE SCRIPT

Lowess Channel + (RSI) [ChartPrime]

25 375
The Lowess Channel + (RSI) [ChartPrime] indicator applies the LOWESS (Locally Weighted Scatterplot Smoothing) algorithm to filter price fluctuations and construct a dynamic channel. LOWESS is a non-parametric regression method that smooths noisy data by fitting weighted linear regressions at localized segments. This technique is widely used in statistical analysis to reveal trends while preserving data structure.

In this indicator, the LOWESS algorithm is used to create a central trend line and deviation-based bands. The midline changes color based on trend direction, and diamonds are plotted when a trend shift occurs. Additionally, an RSI gauge is positioned at the end of the channel to display the current RSI level in relation to the price bands.

Pine Script®
lowess_smooth(src, length, bandwidth) => sum_weights = 0.0 sum_weighted_y = 0.0 sum_weighted_xy = 0.0 sum_weighted_x2 = 0.0 sum_weighted_x = 0.0 for i = 0 to length - 1 x = float(i) weight = math.exp(-0.5 * (x / bandwidth) * (x / bandwidth)) y = nz(src, 0) sum_weights := sum_weights + weight sum_weighted_x := sum_weighted_x + weight * x sum_weighted_y := sum_weighted_y + weight * y sum_weighted_xy := sum_weighted_xy + weight * x * y sum_weighted_x2 := sum_weighted_x2 + weight * x * x mean_x = sum_weighted_x / sum_weights mean_y = sum_weighted_y / sum_weights beta = (sum_weighted_xy - mean_x * mean_y * sum_weights) / (sum_weighted_x2 - mean_x * mean_x * sum_weights) alpha = mean_y - beta * mean_x alpha + beta * float(length / 2) // Centered smoothing


⯁ KEY FEATURES
  • LOWESS Price Filtering – Smooths price fluctuations to reveal the underlying trend with minimal lag.
    스냅샷
  • Dynamic Trend Coloring – The midline changes color based on trend direction (e.g., bullish or bearish).
    스냅샷
  • Trend Shift Diamonds – Marks points where the midline color changes, indicating a possible trend shift.
    스냅샷
  • Deviation-Based Bands – Expands above and below the midline using ATR-based multipliers for volatility tracking.
    스냅샷
  • RSI Gauge Display – A vertical gauge at the right side of the chart shows the current RSI level relative to the price channel.
    스냅샷
  • Fully Customizable – Users can adjust LOWESS length, band width, colors, and enable or disable the RSI gauge and adjust RSIlength.
    스냅샷


⯁ HOW TO USE
  • Use the LOWESS midline as a trend filter—bullish when green, bearish when purple.
  • Watch for trend shift diamonds as potential entry or exit signals.
  • Utilize the price bands to gauge overbought and oversold zones based on volatility.
  • Monitor the RSI gauge to confirm trend strength—high RSI near upper bands suggests overbought conditions, while low RSI near lower bands indicates oversold conditions.


⯁ CONCLUSION
The Lowess Channel + (RSI) [ChartPrime] indicator offers a powerful way to analyze market trends by applying a statistically robust smoothing algorithm. Unlike traditional moving averages, LOWESS filtering provides a flexible, responsive trendline that adapts to price movements. The integrated RSI gauge enhances decision-making by displaying momentum conditions alongside trend dynamics. Whether used for trend-following or mean reversion strategies, this indicator provides traders with a well-rounded perspective on market behavior.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.