Calculating the highest high or lowest low for a specified time range