It's not the nitrates, 5.0 PPM is a very good amount of nitrates to have. I guess it could be an internal parasite, but I don't know much about them, sorry.
Make sure you're doing tests exactly as the directions indicate (sorry if I sound condescending there, I'm just checking) and if the numbers are still the same, it must be a more difficult problem.
Just a question, how old is the tank? It could be that, if it's really old, the fish are just dying of old age.
Sorry I couldn't be of more help.