OPEN-SOURCE SCRIPT

Gaussian Kernel Smoothing EMA

Gaussian Kernel Smoothing EMA

The Gaussian Kernel Smoothing EMA integrates the exponential moving average with kernel smoothing techniques to refine the trend tool. Kernel smoothing is a non-parametric technique used to estimate a smooth curve from a set of data points. It is particularly useful in reducing noise and capturing the underlying structure of data. The smoothed value at each point is calculated as a weighted average of neighboring points, with the weights determined by a kernel function.

The Gaussian kernel is a popular choice in kernel smoothing due to its properties of being smooth, symmetric, and having infinite support. This function gives higher weights to data points closer to the target point and lower weights to those further away, resulting in a smooth and continuous estimate. Since price isn't normally distributed a logarithmic transformation is performed to remove most of its skewness to be able to fit the Gaussian kernel.

This indicator also has a bandwidth, which in kernel smoothing controls the width of the window over which the smoothing is performed. It determines how much influence nearby data points have on the smoothed value. In this indicator, the bandwidth is dynamically adjusted based on the standard deviation of the log-transformed prices so that the smoothing adapts to the underlying variability and potential volatility.

Bandwidth Factor: The bandwidth factor in this indicator is used to adjust the degree of the smoothing applied to the MA. In kernel smoothing, Bandwidth controls the width of the window over which the smoothing is applied. It determines how many data points around a central point are considered when calculating a smooth value. A smaller bandwidth results in less smoothing, while a larger bandwidth smooths out more noise, leading to a broader, more general trend.
Bands and Channelsgaussianindicatorsmoving_averagesmoothedmovingaveragetrendTrend AnalysisVolatility

Script open-source

In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e verificarlo. Un saluto all'autore! È possibile utilizzarlo gratuitamente, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?

Declinazione di responsabilità