Array | Price | SMA | SUM | Smoothed MA |
Day(1) | 1 | - - - | - - - | - - - |
Day(2) | 2 | - - - | - - - | - - - |
Day(3) | 3 | 2 | 1 + 2 + 3 | SUM/3 = 2.00 |
Day(4) | 4 | 3 | 6.00 - 2.00 + 4 | SUM/3 = 2.67 |
Day(5) | 5 | 4 | 8.00 - 2.67 + 5 | SUM/3 = 3.44 |
Day(6) | 6 | 5 | 10.33 - 3.44 + 6 | SUM/3 = 4.30 |
Day(7) | 7 | 6 | 12.89 - 4.30 + 7 | SUM/3 = 5.20 |
Day(8) | 8 | 7 | 15.59 - 5.20 + 8 | SUM/3 = 6.13 |
Day(9) | 9 | 8 | 18.39 - 6.13 + 9 | SUM/3 = 7.09 |
I've seen a note saying the Metastock version was:
Sum(If(C > Ref(C,-1), V*(C-Ref(C,-1)),If(C < Ref(C,-1), V*(C-Ref(C,-1)),0)),18)
with an exponential 9-day moving average around the whole thing.In other words,
9-day EMA of: the 18-day sum of vol*change in price for up days and vol*change in
price for down days.
URL: http://www.bonniehill.net/pages/indicators.html