Welcome to e health forum.
The description of your symptoms could be due to Irritable bowel syndrome.
Irritable bowel syndrome (IBS) is a chronic functional disorder characterized by cramping abdominal pain or discomfort with alterations in bowel habits (bloating, constipation, and diarrhea).
IBS does not cause any permanent damage or any serious illness but the symptoms cause severe discomfort & distress affecting an individuals work, ability to travel and attend social events.
Most symptoms of IBS can be controlled with diet, stress management, and prescribed medications (laxatives, antidiarrheals, antispasmodics, or antidepressants).
You might consult with your doctor or your gastroenterologist for a proper examination and treatment.