Gold fell on Thursday as the dollar rose and stock markets gained confidence with the latest positive development in the U.S.-China trade deal, but concerns over decelerating global economy kept prices hemmed near a multiyear peak.
Silver eased alongside gold after hitting its highest in more than two years.
"There is more optimism on the trade talks and that seems to have some people lightening up on gold," said Michael Matousek, head trader at U.S. Global Investors. "Gold has been up for the past few months, and it's not like it is breaking down. You still want to buy pull-backs on gold."
Gold prices have gained about 8% so far this month, which could be its best month since June 2016 as fragile sentiment over the global economy boosted demand for the safe-haven metal.
"A lot of traders out there feel that even though China came back and said that they want to talk calmly, nothing has really changed ... (Even) with the markets rallying, gold has been pretty much flat," Matousek added.
Wall Street gained after China's commerce ministry indicated that Beijing was hopeful of a resolution to the long-standing trade dispute with the United States.
Meanwhile, U.S. Treasury yields moved off recent lows and the dollar rose 0.3%, making gold less attractive for holders of other currencies.
The U.S. Federal Reserve and the European Central bank are widely expected to cut rates next month. Many investors believe the Bank of Japan could follow suit.
With the current economic weakness, "global central banks will be accommodative and that is supportive for gold," said Jeff Klearman, portfolio manager at GraniteShares.
Holdings of the SPDR Gold Trust, the world's largest gold-backed exchange-traded fund, have increased by 6.6% this month.
Spot silver fell 0.8% to $18.19 per ounce, after matching a high last seen in April 2017 of $18.65.
"Silver had lagged in performance for a long time and now it's joining the ranks of safe-haven investments. It's benefiting from that, and you see platinum doing the same thing," said Klearman.
Platinum rose 1.4% to $912.62 per ounce after climbing as much as 3.9% to its highest since April 2018 at $935.12, while palladium rose 0.3% to $1,472.71 per ounce.