Skip to content

Instantly share code, notes, and snippets.

@ruzli
Last active January 31, 2020 00:00
Show Gist options
  • Save ruzli/d019acbf3319c9661a4328b7ee59bb29 to your computer and use it in GitHub Desktop.
Save ruzli/d019acbf3319c9661a4328b7ee59bb29 to your computer and use it in GitHub Desktop.
1.15x 5 times win to start over
var config = {
baseBet: { label: "BaseBet", type: "balance", value: 100 },
target: { label: "Payout", type: "multiplier", value: 1.15 },
betMultiplier: { label: "Multiply by", type: "multiplier", value: 2 },
go_start: { label: "Start over after", type: "number", value: 5 },
minProfit: { label: "minProfit", type: "balance", value: -1000000 },
}
Object.entries(config).forEach(c => window[c[0]] = c[1].value);
var bet = baseBet;
var wincount = 0;
var min_Profit = 0;
var total_profit = 0;
while (true) {
if (min_Profit - bet <= minProfit ) {this.log(`minProfit triggered ${stop_above / 100} bits`); this.stop();}
const { multiplier } = await this.bet(betSize(bet), target);
if (multiplier < target) {
min_Profit -= bet;
total_profit -= bet;
bet = bet * betMultiplier;
wincount = 0;
} else {
min_Profit += bet * (target - 1);
total_profit += bet * (target - 1);
wincount++;
}
if (wincount >= go_start) { bet = baseBet; min_Profit = 0 }
this.clearLog();
this.log(`Total Profit ${Math.round(total_profit / 100)} bits`);
this.log(`Session Profit ${Math.round(min_Profit / 100)} bits`);
}
function betSize(bet) { return Math.max(100, Math.round((bet) / 100) * 100) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment