Gold surrendered earlier gains to trade little changed on Tuesday as the U.S. dollar inched higher, although a dip in Treasury yields and growing recession fears kept bullion near four-week peak.

Spot gold was flat around $1,771.29 per ounce by 0843 GMT, after hitting its highest since July 5 at $1,780.39 earlier in the session.

U.S. gold futures were unchanged at $1,787.10.

Falling U.S. real rates have supported gold in recent days, and the next data point important for the metal are U.S. payrolls due on Friday, UBS Analyst Giovanni Staunovo said.

However, further interest rate hikes by the U.S. Federal Reserve and declining inflation should weigh on prices over the next six months, Staunovo said.

Benchmark U.S. 10-year Treasury yields hit a four-month low, decreasing the opportunity cost of holding the non-interest-paying bullion, while the dollar index rose 0.2%, having earlier hit a four-week trough.

Gold has benefited from a host of dour economic data recently, with a survey on Monday showing that factories across the United States, Europe and Asia struggled for momentum last month.

Investors are keeping a close eye on macro economic indications since Fed Chair Jerome Powell said decisions on future rates will be determined by incoming data.

Rate hikes by major central banks to combat soaring inflation typically weigh on bullion’s appeal.

“Gold could push a little higher towards mid $1,800 because the dollar will continue to weaken over the course of August as a lot of the macro numbers in the U.S. are starting to look worse,” said Edward Meir, an analyst with ED&F Man Capital Markets.

Traders are also keeping watch on possible escalation in Sino-U.S. tension, with U.S. House of Representatives Speaker Nancy Pelosi set to begin a visit to Taiwan amid objections from China.