Gold futures ended higher for a fourth straight session on Tuesday, on the back of a move by China’s central bank to devalue the yuan by a near 2 percent, in emergency measures to shore up the slowing Chinese economy.