Created
September 15, 2018 13:39
-
-
Save ruzli/5870ee60b3ee2ae914cb160b5e8385d7 to your computer and use it in GitHub Desktop.
something random by improved by me
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const baseBet = 100 /* in Satoshies */ | |
const baseTarget = 1.41 | |
const betMultiplier = 3.5 | |
const addictionTarget = 0.1 /* Increasing target on each next loss on gateways, set to 0 if don't need it */ | |
const maximumBet = 20 /* Bits */ | |
const maxLoss = 200 // Below these value in bits - stop script | |
const maxProfit = 5000 // Above these value in bits = stop script | |
const playAfterLossStreak = 2 | |
const baseskipsCount = 190 | |
const skippableBetsTarget = 1.01 | |
const skippableBets = 1 | |
let skiptime = false | |
let bet = baseBet | |
let target = baseTarget | |
let lossStreak = 3 | |
let skips = 0 | |
while (true) { | |
if (this.balance / 100 <= maxLoss){ | |
this.log(`To prevent in further loss you reached maximum loss.`) | |
await this.stop() | |
} | |
if(this.balance >= maxProfit){ | |
this.log(`Maximum profit was hit. Good job.`) | |
await this.stop() | |
} | |
skips++ | |
if (skips >= baseskipsCount){ | |
if(skiptime == false){ | |
skiptime = true | |
}else{ | |
skiptime = false | |
} | |
skips = 0 | |
} | |
if (skiptime == true){ | |
var {multiplier} = await this.skip() | |
}else{ | |
var {multiplier} = await this.bet(skippableBets * 100, skippableBetsTarget) | |
} | |
if (multiplier < target) { | |
lossStreak++ | |
} else { | |
lossStreak = 0 | |
} | |
while (lossStreak >= playAfterLossStreak) { | |
if (bet / 100 == maximumBet){ | |
bet = baseBet | |
target = baseTarget | |
lossStreak = 0 | |
} | |
if (bet / 100 > maximumBet){ | |
bet = maximumBet * 100 | |
} | |
const {multiplier} = await this.bet(bet, target) | |
if (multiplier < target) { | |
lossStreak++ | |
bet = bet * betMultiplier | |
bet = Math.round(bet / 100) * 100 | |
target = target + addictionTarget | |
} else { | |
lossStreak = 0 | |
bet = baseBet | |
target = baseTarget | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment