Set TimeFrame to 0 during the range bar, and to the number of skipped bars when the range ends.