The swimming problems sound like swim bladder disease. Unfortunately fancy goldfish are quite prone to this. Sometimes fasting your fish for a day then feeding it a pea the next day can help (defrost a frozen unsalted pea, squeeze it out of the skin, mush it up and feed a little to your fish).
What are you feeding your fish at the moment? If you are feeding pellets you should soak them in water outside of the tank for a bit before feeding them to your fish.
The quality of the water is also likely to be causing the fish problems. I read in the other link the fish was a present and you just have it in a small tank at the moment. Doing regular water changes is vital. How big is the tank? If you don't know how much water it holds, just post the measurements of the tank and someone will figure it out for you. How much water are you changing and how often at the moment?