I don't think it was caused by the algae wafer (although I don't know what Swordtails are and are not supposed to eat). What you're describing sounds like a swim bladder disease. How does your fish swim? Does it swim straight or on the side? When fish are sick they lose their appetite. Wait for someone who knows well about fish diseases to confirm what disease your fish has, and to eventually suggest an appropriate treatment.
Here are Fish Lore descriptions of tropical fish diseases:
http://www.fishlore.com/Disease.htm
You can also find disease descriptions on many other tropical fish websites.
While you're trying to figure what disease it is, it is always safe to use aquarium salt (1 tablespoon of salt per 5 gallons of water) in conjunction with increasing the tank temperature to around 82F. If you're not using any medications it's also good to be doing frequent water changes (if the fish is still sick, add appropriate amount of salt back to the tank with each water change).
If you have any scale-less fish in your tank, don't add the salt (I have read somewhere on Fish Lore that scale-less fish are very sensitive to salt - so you may want to ask someone if it's safe to use salt in a tank with scale-less fish). If you can use salt, dissolve salt in a cup or two of water first. Then very gradually pour that solution into your tank.
P.S. Can you list your ammonia, nitrite, nitrate, and pH levels? And what is the temperature exactly?