comex gold ends higher after five-session losing streak