I took the martingale strategy and slightly modified it, to make sure it starts at my base bet, and to allow me to bet with my choice of payout multiplier: Code: var baseBet = 1; // in Bits var mult = 2.01; var satoshis = baseBet * 100; var crash = Math.floor(mult*100 + 1e-6); var currentBet = false; engine.onGameStarting = function () { if (currentBet && engine.lastGameWasLost()) { currentBet *= 2; console.log('double bet to', currentBet/100); } else { currentBet = satoshis; console.log('reset bet to', currentBet/100); } if (currentBet < engine.getBalance()) { console.log('place bet of', currentBet/100, 'at', crash/100); engine.placeBet(currentBet, crash, false); } else { engine.stop(); console.log('You ran out of bits :('); } };