بسم الله الرحمن الرحيم
If menstrual blood stops within less than three days, it shall be considered istihazah (vaginal bleeding other than menses). But if the woman has fixed habit (i.e. five or six days in a month etc) she should avoid having intercourse during these days, because there is a chance that she starts bleeding till her expected days.
(2) If the woman has fixed habit (of five or six days for example) and her blood stops as usual, it is allowed for her to perform salah after ghusl and have intercourse. And if after praying salah etc bleeding starts again, then if it exceeds more than ten days, it shall be considered istihazah, and she will have to offer the missed salah of this period, and if it remains within less than ten days, it will be considered that her habit has changed and it would be considered menstrual blood. She should do tauba and istighfar for the intercourse she had during this period. In such condition when the blood comes again she should avoid offering salah, reciting the holy Quran and having intercourse etc up to ten days.
Allah knows Best!
Darul Uloom Deoband