If the tank has been set up for 18 months and you do regular water changes and the filter has not been washed out under tap water, the water should be fine.
When you do the water changes, how much water do you remove and replace?
When you do the gravel clean, do you use a normal gravel cleaner and suck the gunk out of the tank along with some water? Or do you have an electric gravel cleaner that sucks the gunk into a mesh bag and returns the water back to the tank?
As a general rule it is preferable to use a basic model gravel cleaner like the one in the following link. Use it whenever you do a water change (each week), and syphon some water out while you are cleaning the gunk out of the gravel. Then top the tank up with clean water that is free of chlorine/ chloramine.
https://www.about-goldfish.com/aquarium-cleaning.html
How often do you clean the filter and how do you clean it?
--------------------------
If you set the camera resolution to about 2MB and use the flash, then take a number of pictures and put them on your pc, you should be able to find a nice clear image showing the fish's anal fin and we will able to sex it.
The fish in the new pic looks like a female but its a bit blury.
--------------------------
The male platy in the original picture could have intestinal worms and or gill flukes. Most livebearers carry these and the stress of being bullied and these parasites could be causing the issue.
You can use Praziquantel to treat gill flukes and tapeworm, and Levamisole to treat thread or roundworms.
You should treat any tanks you have at the same time and treat the fish once a week for 3 treatments to kill the worms. The gill flukes will need treating several times a week for several weeks. The instructions should be on the packet.
Treat for tapeworm and gill flukes first. Then after they have been treated you can do the round/ thread worms.
To work out the volume of water in the tank:
measure length x width x height in cm.
divide by 1000.
= volume in litres.
When you measure the height, measure from the top of the substrate to the top of the water level.
There is a calculator/ converter in the "How To Tips" at the top of this page that will let you convert litres to gallons if you need it.
Remove carbon from the filter before treating or it will absorb the medication and stop it working.
Wipe the inside of the glass down, do a 75% water change and complete gravel clean. And clean the filter before treating.
Increase surface turbulence/ aeration when using medications because they reduce the dissolved oxygen in the water.
--------------------------
As long as the fish is swimming about and continues to eat, there is no need to euthanize it. Try the Praziquantel and keep feeding it and it should get better.
If the fish was swimming and eating last night it is probably hiding.
In the morning open the curtains or turn the room lights on. Wait 30 minutes or more before turning the tank light on. This lets the fish wake up slowly instead of being ina dark tank and then getting full bright light.
At night turn the room light on and then turn the tank light off. Wait 30 minutes or more before turning the room light off. This allows the fish to settle down for the night instead of being in a brightly lit tank that suddenly goes dark.