comex gold logs third gain in four sessions