What matters is what is described in manual for TimeFrameExpand http://www.amibroker.com/f?timeframeexpand
Users guide is the only authoritative source of information and really all you ever needed.
TimeFrameExpand docs clearly say:
expandLast - the compressed value is expanded starting from last bar within given period (so for example weekly close/high/low is available on Friday's bar)
expandFirst - the compressed value is expanded starting from first bar within given period (so for example weekly open is available from Monday's bar)
The default is expandLast. That is why you are getting timestamps like xx:04.
and then you think something is wrong, but it isn't. It is perfectly all right and program operates exactly the way you told it to operate. If you want xx:00 timestamp you need expandFirst as written in manual. In your case:
TimeFrameSet( in5Minute ); .... StaticVarSet( "name", TimeFrameExpand( compressed_array, in5Minute, expandFirst ) );
And really as I wrote and as @Milosz wrote, your entire approach is more convoluted that it needs to be. You are builing complex schemes of operations for no gain. Really. Why you need to store high in static variable? Makes no sense to me. Even if you want some indicator. Calculate it on the fly in the formula which consumes it. You seem to be over-engineering the whole thing. Static variables are not really meant to be used the way I see them used. They should be used sparingly for few "state" variables not as some gigantic "virtual hard disk" where you store everything you might need.