Your timeframe selects every 5th bar, not evry 6th minute.

For every 6th minute, i would use if(minute() % 6 == 0).