Hi,
Like Koko said, start with the water quality. Just about all problems begin with poor water conditions. I am sure that your problems began with water quality issues. Testing is where to start but other factors need to be considered.
That is why it is so important to have enough space for your goldies--at least 10 gallons per fish. It helps dilute the wastes produced by the fish.
The proper size tank (as large as you can afford), a good filter or filters, testing the water weekly and doing partial water changes using a water conditioner, not overfeeding, having airstones and bubble walls --all of these things contribute to good water quality.
High nitrates can cause the floating--swim bladder disorder can sometimes be corrected by feeding peas--thaw, pop off skins, and cut up in pieces for the fish to eat. Goldies usually love peas. It helps clean them out and sometimes that is why they are floating (constipation).