gold ends off highs amid dollar gyrations