gold ends 0.4% higher at $1,740.40 an ounce