gold ends lower on rising dollar