The next value would be determined by formula SM2.
SM2 = ( PREVIOUS SUM - PREVIOUS AVERAGE + PRICE 4 ) / PERIOD
For the calculation of SM2: PREVIOUS SUM is the sum of PRICE 1 + PRICE 2 + PRICE 3; PREVIOUS AVERAGE IS THE VALUE OF SM1.
The next value would be determined by formula SM3.
SM3 = ( PREVIOUS SUM - PREVIOUS AVERAGE + PRICE 5 ) / PERIOD
Subsequent values wold be determined by subtracting the PREVIOUS AVERAGE from The PREVIOUS SUM, adding the next more recent PRICE, then dividing by the PERIOD.
PERIOD is the number of bars in the string you are plotting. For example, in the
ALLIGATOR it would be 13 for BLUE LINE, 8 for RED LINE, and 5 for GREEN LINE.
The primary difference between a SMOOTHED MOVING AVERAGE and a SIMPLE MOVING AVERAGE: In a SMOOTHED MOVING AVERAGE YOU SUBTRACT THE PREVIOUS AVERAGE and in a SIMPLE you subtract THE EARLIEST PRICE.