Dollar heads for biggest weekly gain since February