comex gold logs first gain in six sessions