A month ago I sprained my ankle by twisting, doctor said xray is ok, nw pain is less but longtime setting affects the swelling. What can I do?

Wear a. Compressive ankle garment. Often times they may be made of neoprene, or out of the same fabric as an ace bandage.
Physical therapy . You can begin doing some physical therapy to help strengthen your ankle including balance exercises. If you continue to have pain, instability and swelling, an MRI may be warranted to look for a torn ligament.
Have it evaluated. Pain may last a long time following a foot or ankle injury. An x-ray can show if there is an underlying fracture. You may have a soft tissue injury if it is just a sprain and may have damaged the muscle, tendon, or ligaments in the area. Have it evaluated by a professional and get the appropriate treatment.