A weighted moving average is simply a moving average that is weighted so that more recent values are more heavily weighted than values further in the past.
The commonest type of weighted moving average is exponential smoothing. The calculation is quite simple:
P0 + αP1 + α2P2 + α3P3 + ⋅⋅⋅+ αnPn + ⋅⋅⋅
where α, the smoothing factor, is more than zero and less than one,
P0 is the latest value on which the moving average is being calculated and
Pi is the value i periods previously (usually i days ago).
It is not necessary to sum the entire infinite series, just enough of it to give an accurate estimate.
There is evidence that the use of weighted moving averages gives better volatility estimates than simple moving averages do.