Gold held firm on Wednesday, supported by a weaker dollar and trade tensions as the market looked ahead to an expected US rate hike next week when the Federal Reserve meets. Spot gold was up 0.4 percent at $1,300.6 an ounce at 1453 GMT while US gold futures for August delivery gained 0.2 percent to $1,304.8 per ounce.
"Investors are sitting on the fence, they only want to be involved when we break out of the range," said Ole Hansen, head of commodity strategy at Saxo Bank in Copenhagen.
Gold was trapped between the 200-day moving average at around $1,308 and $1,286 on the downside, he added.
The case for hiking US interest rates next week was bolstered on Tuesday when data showed US services sector activity accelerated in May and job openings rose to a record high in April.
Gold, which is a non-interest-paying asset, could see demand take a hit from higher rates.
Once the rate decision has been taken, gold is likely to move higher, Hansen said. "There is potential for gold to follow the same pattern it's taken after recent rate hikes: defensive before, only to rally afterwards."
A softer greenback provided support to dollar-denominated gold after the euro rose to a 10-day high when European Central Bank officials said an end to the bank's bond-buying programme by the end of 2018 was plausible.
Potential investors in gold were also waiting to see how trade tensions play out since many believe recent US tariffs are negotiating tactics, analysts said.
"Investor interest is mixed towards gold in the current environment, with geopolitical tensions attracting reduced flows and limiting the downside risk rather than propelling prices higher," Standard Chartered said in a note on Tuesday.
Holdings of SPDR Gold Trust, the world's largest gold-backed exchange-traded fund, fell 0.03 percent to 836.13 tonnes on Tuesday, the lowest since mid-March.
In other precious metals, silver gained 1.5 percent to $16.71 an ounce.
Platinum added 0.2 percent to $902 an ounce and palladium climbed 1.2 percent to $1,006 per ounce.