What's your Just-Dice userid?
Thanks, Doog!
user ID: 156525
username: itod
I'll try to martingale from 15 to 30 CLAMs!

I sent the tip.
I made this slight change to the code:
if bet > bankroll: # we can't afford the next bet
if bankroll > 0:
bet = base
else:
break
ie. if we can't afford to continue the sequence, reset to the starting bet unless we're out of coins completely.
After that we're back to the 50% chance of doubling up that I was expecting to see:
1500151 wins out of 3000000 rounds (50.005%)
0:49.99%, 30:50.01%
expectation: 15.00151