i think you did a mistake in your strategy!
You go to next step on loss instead of on win, in the first 3 steps!
So your strategy should better be called:
3x Black and then Martingale on Black - or something like this ;-)
Thanks for pubilishing your idea.
I made a clone: 3x Red then Black