Change to the IsApplyHighLowLogic routine so it works out the max and min over the same range on alternate points. E.g.
if a chart is 1000 values but bounds are 100:
point 0 would be the max of 0 to 10
point 1 would be the min of 0 to 10
point 2 would be the max of 11-20
point 3 would be the min of 11-20