Gold retreated after hitting a record high, buoyed by Middle East tensions and US election uncertainty. Profit-taking followed 4-day rally, seeing haven demand.