That's a tougher question than it seems at first glance. On each new bar one old bar ages out of consideration while the new one replaces it. Identifying the oldest one is easy since the bar series is in date order. But lowest and highest are less apparent. 'Caching' them could pay off for a 'long' interval. But for 20 my guess is the brute force approach should be tried. Not a very clever suggestion I know, but . . .
Caching becomes a bit complicated: keep the date of the highest and lowest. On each new bar, mark departing bar as not highest if highest is replaced by new bar. Similarly for lowest. If departing bar is marked both not highest and not lowest you are done (probably no need to actually make this test since this result is fall-out from the next two tests). Otherwise (if not marked) if departing matches highest use brute force to look for new highest. Same for lowest. (Order of tests may not be optimal. I did not test this so the logic may actually be screwed up.
I don't know whether I am helping or not?