Can someone provide me the AFL for a Smooth Moving Average? I have got the formula for the same over the internet but I am not able to convert it into an AFL.
Formula:CalculationThe first value of this smoothed moving average is calculated as the simple moving average (SMA) with the same period. The second and succeeding moving averages are calculated according to this formula:
PREVSUM = SMMA(i-1) *N
SMMA(i) = (PREVSUM-SMMA(i-1)+CLOSE(i))/N
Where: SUM1 is the total sum of closing prices for N periods;
PREVSUM is the smoothed sum of the previous bar;
SMMA1 is the smoothed moving average of the first bar;
SMMA(i) is the smoothed moving average of the current bar (except for the first one);
CLOSE(i) is the current closing price;
N is the smoothing period.
Thanks
Formula:CalculationThe first value of this smoothed moving average is calculated as the simple moving average (SMA) with the same period. The second and succeeding moving averages are calculated according to this formula:
PREVSUM = SMMA(i-1) *N
SMMA(i) = (PREVSUM-SMMA(i-1)+CLOSE(i))/N
Where: SUM1 is the total sum of closing prices for N periods;
PREVSUM is the smoothed sum of the previous bar;
SMMA1 is the smoothed moving average of the first bar;
SMMA(i) is the smoothed moving average of the current bar (except for the first one);
CLOSE(i) is the current closing price;
N is the smoothing period.
Thanks