yes, that looks pretty good. Is that code doing anything other than looking at the lowest low/highest high within a band of bars. For example lows identified with lowest low for 5 preceding bars and 5 following bars.