Post
Topic
Board Gambling
Re: Seuntjies DiceBot -Multi-Site, multi-strategy betting bot for dice. With Charts!
by
HCP
on 12/02/2018, 20:42:31 UTC

Code:
if currentstreak==-3 then
Thanks for your reply, but that's not what I'm looking for.  That's not enough to solve my issue.

The code below should effectively do what you have asked for... NOTE: I've basically only tested that it "runs"... I haven't tested all possible outcomes etc so USE AT YOUR OWN RISK!


Quote
How can I get it to only martingale on each 4th bet after 3 losses without continuing the martingale on  loss 5, 6, 7, 8, etc?
I think my example with W, L is very clear with what I'm looking for. 
Also, be aware, that this will ONLY bet the 4th bet of a losing streak, regardless of the length of the losing streak. That is to say:

Quote
W
L
L
L - 3 losses, nextbet = 1st martingale (0.000005)
L - martingale lost, increase martingale (0.00001), nextbet = basebet
L - basebet
L - basebet
L - basebet
L - basebet
L - basebet
L - basebet
W
L
L
L - 3 losses, nextbet = 2nd martingale (0.000005)
L - martingale lost, increase martingale (0.00002), nextbet = basebet
L - basebet
L - basebet
L - basebet
L - basebet
L - basebet
L - basebet
W
L
L
L - 3 losses, nextbet = 3rd martingale (0.00002)
W - martingale won, reset martingale (0.000005), nextbet = basebet
L
L
....

Is that correct? Or should it be doing martingale in middle of long loss streaks? like this:
Quote
W
L
L
L - 3 losses, nextbet = martingale
L - martingale loss
L
L
L - 3 losses, nextbet = martingale
L - martingale loss
L
L
L  - 3 losses, nextbet = martingale
W - martingale win, reset martingale
L
L
...


Code:
chance = 50
basebet = 0.0000001
nextbet = 0.0000001
bethigh = true
martingalebasebet = 0.000005
currentmartingalebet = martingalebasebet
multiplier = 2
ismartingale = false

function dobet()

   if (currentstreak == -3) then
      -- we've had 3 losses in a row, martingale time!
      print("Martingale Time!")
      print("currentBet = " .. currentmartingalebet)
      nextbet = currentmartingalebet
      ismartingale = true
   elseif (win and ismartingale) then
      -- martingale bet won, reset
      print("Martingale WIN! - Resetting")
      currentmartingalebet = martingalebasebet
      ismartingale = false
      nextbet = basebet
   elseif (ismartingale) then
      -- martingale bet lost
      currentmartingalebet = currentmartingalebet *  multiplier
      print("Martingale Loss! - Increasing to: " .. currentmartingalebet)
      ismartingale = false
      nextbet = basebet
   else
      nextbet = basebet
   end
 
end