LOWESS Channel & Extrapolation [LuxAlgo]The LOWESS Channel & Extrapolation indicator calculates a Locally Weighted Scatterplot Smoothing (LOWESS) curve to define a non-linear trend and projects it into future bars using local regression slopes. It provides a dynamic channel based on the standard deviation of residuals, helping traders identify overextended price levels and potential mean-reversion points.
The LOWESS Channel & Extrapolation indicator is subject to repainting and displayed retrospectively.
🔶 USAGE
This tool is primarily designed for trend analysis and identifying exhaustion points. Because the LOWESS algorithm recalculates based on the most recent data window, the entire historical curve can adjust, making it a powerful tool for backtesting and analyzing past market structures rather than for real-time signal generation without confirmation.
🔹 Trend Identification
The central fit line represents the smoothed local trend. When the curve is sloping upward, the local market sentiment is considered bullish; conversely, a downward slope indicates bearish sentiment.
🔹 Overbought/Oversold Conditions
The dashed outer channels represent a volatility-adjusted boundary. When price moves outside these boundaries, it is statistically overextended relative to the local trend, often preceding a move back toward the mid-line.
🔹 Extrapolation
The indicator extends the most recent local regression slope into the future. This provides a "path of least resistance" projection based on the current momentum of the smoothed curve.
🔶 DETAILS
The LOWESS (Locally Weighted Scatterplot Smoothing) algorithm works by performing a separate weighted linear regression for every data point in the window.
It uses a "tricube" weighting function, which ensures that data points closer to the focal point have a higher influence on the fit than points further away. This results in a curve that is much more flexible than a simple moving average and can adapt to complex price cycles without the lag associated with traditional filters.
The channel width is determined by calculating the Standard Deviation of the residuals (the difference between the actual price and the LOWESS fit). This ensures the channel expands during high volatility and contracts during consolidation.
🔶 SETTINGS
Length : Determines the number of historical observations used to fit the LOWESS curve. Larger values result in a smoother, more macro trend. Span : The fraction of data points used for each local regression. A higher span (closer to 1.0) creates a smoother line, while a lower span allows the curve to follow price more tightly. Channel Multiplier : Multiplier applied to the standard deviation of residuals to define the distance of the upper and lower bands from the mid-line. Extrapolation Bars : The number of bars to project the current trend into the future. Fit Color : Sets the color and transparency of the central LOWESS line. Channel Color : Sets the color of the dashed outer bands and the background fill. Line Width : Adjusts the thickness of the central fit line.
Pine Script®指标






















