Your location is not evident so I will assume it get cold at night where you are located. He needs to be kept warm and dry. Being out in direct sun during day is good.
Can you show a picture of his breast while holding him showing your hand squeezing his breast? This can indicate how poor he is.
Show some pictures of his stool / poop. We are looking for signs of blood or worms.
I do not normally suggest this but addition of electrolyte to his water may be helpful if he is currently dehydrated.
If poop shows signs of blood, then cocci most likely problem. I will then ask if he has been reared indoors until recently, if he was reared up off ground until recently, and was he recently acquired from somewhere else and put on ground with birds he was not raised with.
If worms, then hopefully we are not too late and you can get a dewormer into him without causing further problems.
To frank, with birds his size developing such health problems, I cull them unless it is a move related problem.