A weighted moving average is calculated by defining weight factors, W1, W2,... Wn, for each day in the n day moving average. The weighted moving average for day d is then:
Note that if all the weights, Wi are 1, this equation reduces to that of a simple moving average.