I have a column of Daily Simple Moving Averages and I'm trying to determine the accumulative change as long as the daily change is in the positive direction, but when the SMA changes direction and the change starts to go negative direction I need to accumulate the change in the negative direction until it changes direction again, and so on. Obviously the number of rows the SMA change remains negative or positive is unknown. And I need to be able to copy the accumulative formula down many rows. For example.
SMA Change Accumlative
1.0794 0.0001 0.0001
1.0789 0.0002 0.0003
1.0787 0.0003 0.0005
1.0786 0.0002 0.0007
1.0787 -0.0005 -0.0005
1.0789 -0.0009 -0.0014
1.0779 -0.0013 -0.0027
1.0769 -0.0018 -0.0045
1.0755 -0.0021 -0.0066
1.0737 -0.0027 -0.0093
1.0720 -0.0030 -0.0123
1.0709 -0.0028 -0.0151
1.0709 -0.0016 -0.0167
1.0710 -0.0004 -0.0171
1.0717 0.0003 0.0003
1.0726 0.0009 0.0012
1.0743 0.0013 0.0026
1.0756 0.0016 0.0041
1.0774 0.0019 0.0060
Bookmarks