Gold edged lower on Friday as the dollar firmed ahead of an expected meeting between U.S. President Donald Trump and China's President Xi Jinping at the G20 summit, but bullion was on track to post its second straight monthly gain.
Palladium soared to a record high on the back of a structural deficit in the market due to a shortage of supply, putting it just $27 shy of parity with gold.
Trump and Xi are expected to discuss trade on the sidelines of the G20 summit on Saturday in Argentina, where global trade tensions are expected to dominate the agenda.
"There is caution ahead of the G20 meeting between Trump and Xi, a little bit of nervousness about placing fresh positions ahead of their discussion, where the outcome is pretty much uncertain," said Capital Economics analyst Ross Strachan.
The dollar was slightly firmer as markets awaited the outcome of the talks.
"Gold has been quite stable so far, which reflects the relative stability we're seeing in the dollar ahead of the G20 summit. How gold responds will depend on the message conveyed by the two Presidents," said Craig Erlam, an analyst at OANDA.
"A break above $1,240 would indicate some encouraging progress in talks and take out key upside resistance, with the next notable level being $1,260."
"Equally, a break below $1,200 would suggest a failure to make progress, bringing $1,180 into focus."
Bullion was on track to post a second straight monthly gain, up about 0.6 percent.
"The setup for gold is getting better and better, particularly due to the uncertain economic outlook due to the Trump presidency, and gold looks set for a strong 2019," Mark O'Byrne, research director of Dublin-based gold dealer GoldCore, said.
Palladium dropped 0.10 percent to $1,179.80 per ounce, having struck a record high of $1,194.50 earlier in the session.
The metal, used in emissions-reducing autocatalysts, was also poised for its biggest monthly gain since January 2017.
"The key aspect for the palladium market is the very large scale structural deficit. What you've seen recently is more investors getting attracted to it as it hits fresh record highs," Capital Economics' Strachan said.
"In the short term, we could see prices drop back precisely because of the auto picture, with Chinese sales set to decline for year as a whole for the first time in 28 years."
Spot silver fell 1.08 percent to $14.12 per ounce.
Platinum dipped 2.26 percent to $795.49, on track for a fourth consecutive weekly decline. The metal is set to fall more than 3 percent in November, after gaining in the previous two months.