Hello,
Welcome to ehealthforum
Foul smelling vaginal discharge is indicative of infection.Sometimes after a miscarriage infection and pain can be present suggestive of PID.Irregular periods are indicative of Hormonal imbalance.
You require a pelvic examination and investigations as USG scan and Hormonal Analysis to rule out the exact cause.Consider visiting a Gynaecologist as you require an appropriate treatment.
Take Care!