Gold heads for best week in four as stocks retreat