Gold retreats as dollar index taps highest levels since mid-July