A mathematical fact:
If you look at a say 10 period SMA and then see if it is going up (as in higher now this period than on previous period), that is exactly equivalent to looking whether the market is higher or low now than it was 10 periods ago.
Try it with e.g. 3 period
A B C D
SMA(before) = 1/3*(A+B+C)
SMA(now) = 1/3*(B+C+D)
Difference = 1/3*(D-A)
since only sign matters you are only looking if D > A or D < A
If you look at a say 10 period SMA and then see if it is going up (as in higher now this period than on previous period), that is exactly equivalent to looking whether the market is higher or low now than it was 10 periods ago.
Try it with e.g. 3 period
A B C D
SMA(before) = 1/3*(A+B+C)
SMA(now) = 1/3*(B+C+D)
Difference = 1/3*(D-A)
since only sign matters you are only looking if D > A or D < A