Gold holds gains on weak dollar; rising stocks cap gains