Hello, I would like to keep track of the number of times (count) that the price moves up and moves down within a 20-minute period. I assume I'd have to script on the 1-minute bars, the logic being something like this: if close < close[1] then increment lowerprice counter else increment higherprice counter I've been reading about looping with fold, but I'm not comfortable with it yet.by jjclay - Trading Discussion