gold ends higher, posts best settlement price since july