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
Traders_Endeavors

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