I assume you adjust the value you use for your bankroll to reflect your current bankroll at each step. In that way you are risking a lesser amount at each step if you are on a losing streak.