Using TimeFramecompress and TimeFrameexpand with Foreign Securities

I use tick data with Iqfeed.

To get the prior daily close, I use:

symbolPriorDailyClose=TimeFrameCompress(Ref(C,-1), inDaily,compressOpen); 
symbolPriorDailyClose= TimeFrameexpand( symbolPriorDailyClose, inDaily,expandFirst ); 

The results I get seem to correspond to the close reported by Yahoo and others as long as I filter out oddlots and I use 4:01 PM as the database setting for end of day. I am guessing the Yahoo daily close is the last round lot at 4:00 pm whereas the Amibroker close is the last trade prior to the time of close set in database settings. I could also be misspecifying something in the code above. In any case, I am getting the results I want.

If, however, I try to get corresponding data for a foreign security using:

foreignPriorDailyClose=TimeFramecompress( Ref(otherC,-1), inDaily,compressOpen );
foreignPriorDailyClose=TimeFrameexpand( foreignPriorDailyClose, inDaily,expandFirst );

where otherC = Foreign( "other security", "C");

I think I am getting the close at 3:59 rather than 4:00 even though I am using 4:01 as my close of day in database settings.

I would appreciate any advice on this.