Savitzky-Golay Smoothing Filter

The Savitzky-Golay Filter is a polynomial smoothing filter.
This version implements 3rd degree polynomials using coefficients from Savitzky and Golay's table, specifically the coefficients for a 5-, 7-, 9-, 15- and 25-point window moving averages.
The filters are offset to the left by the number of coefficients (n-1)/2 so it smooths on top of the actual curve.
You can turn off some of the smoothing curves, as it can get cluttered displaying all at once.
Any feedback is very welcome.
Note di rilascio: Savitzky-Golay digital filter, useful for smoothing data.
This script implements the 5-, 7-, 9-, 15-, and 25-point window 3rd degree polynomial fit coefficients.
The plots are offset by (n-1)/2 where n is the window size, so it fits the original data.
Any feedback is welcome.
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?


what you think of multi staging this filter for noise reduction, i tried something with it, but never got around to do much with it and ended up forgotten.
anieri RicardoSantos
@RicardoSantos, I've found it very useful to apply it more than once to the same input, although I do not fully understand the consequences of doing so.
One of the nicest uses was to further smooth a simple moving average (which is not far from the savitzky-golay filter): when you take, for example, a derivative of the smoothed SMA, you get much nicer results.
@anieri, ok, thank you for the reply
Home Screener azioni Screener forex Screener cripto Calendario economico Su di noi Caratteristiche Grafico Costi Invita un amico Regolamento Centro di supporto Soluzioni per broker & siti web Widget Librerie grafiche Libreria grafica leggera Blog & Novità Twitter
Profilo Impostazioni profilo Account e fatturazione Amici invitati Coin I miei ticket di supporto Centro di supporto Messaggi Privati Chat Esci