The few ways you can contribute in preventing miscarriage is to carryout medical investigation on the reasons why you miscarried before.The investigation could include areas like:
Stress,cervical incompetence, diabetes,progesterone level etc and each has a possible solution.Then if medically you are sound in all this areas,you will be prescribed DUPHASTON AND VASOPRIN which u will start taking immediately you test positive again till 33weeks of pregnancy. Good luck