1. If(C>Ref(C,-1),1,0) - If current close is greater than previous close then 1 else zero.
2. Sum of 1 for last 5 periods (i.e. sum of either 1 or 0 from point 1 result)
3. If(C<Ref(C,-1),1,0) - If current close is less than previous close then 1 else zero
4. Sum of 3 for last 5 periods (i.e...