LookBack can currently be set to a fixed value (i.e. 0, 500).

But sometimes I have a series() that accumulate elements under strange occasions. I can identify programmatically when I have enough elements.

So it can work like this:

Script calls extendLookBack(1) when more lookback is needed to accumulate enough series elements.
Script later calls extendLookBack(0) when enough elements are accumulated. At the end of this run, Logfile will read, "End of lookback period".