It's strange to me that no one has yet stated that swordtails need at least a 30 gallon tank.... They get WAY too big and are way too active for a 10 gallon.
OP we need to know your ammonia, nitrite, and nitrate levels. Do you know how to cycle a tank? If so, can you explain how you did it?
These things will help us figure out your fish's strange behavior.
I agree that a 50% water change should be the first thing you do whenever you notice something is unusual.
I also agree that if your tank is not cycled, pH is the least of your worries.