Post
Topic
Board Gambling discussion
Re: Seuntjie' Dice bot programmers mode discussion.
by
anp31
on 04/08/2015, 04:11:49 UTC
Hi chilly.
I have this (it's working):

chance=49.5
multiplier=1.05
multiplier2=0.95
base=0.00001000
nextbet = base 
bethigh = false
target = .0001


function dobet()

   if win then
      nextbet=previousbet*multiplier2
   else
      nextbet=previousbet*multiplier
   end
end

Now i want to add reset bets function, same like you have in your strategy (reset when target balance is met)
In other words i want to start with 1 btc, startbet(0.00001000) target(0.00000100) when i make my target i want to automatically reset bets and start over with new balance.
Can you help me with that?
     

   I think I understand what your asking.  But I think you have your startbet and target reversed in the comment above.  (not the code).  first you need to save your balance.  I created savebalance in the init section (before the dobet function).  I'm setting it equal to balance, which is a special variable that the bot fills in.  So in theory we should now have the balance before any bets are placed.  In reality you should issue one bet from the bot before starting your script.  Then balance will be correct.  But even if you forget it will correct itself pretty quick. 

   now that you have your initial balance, you only need to check for the target in the win path.  IE you can't reach your target on a lose.  so we can add another if statement before you set nextbet.  This checks and if the current balance minus the saved balance is greater then your target, save the new balance and reset the bet to the base.  if you didn't reach the target, increase your bet. 

   here is the code. 

Code:
chance=49.5
multiplier=1.05
multiplier2=0.95
base=0.00001000
nextbet = base 
bethigh = false
target = .0001
savebalance = balance


function dobet()

   if win then
      if ((balance - savebalance) > target) then
         savebalance = balance
         nextbet = base
      else
         nextbet=previousbet*multiplier2
      end
   else
      nextbet=previousbet*multiplier
   end
end

Thanks a lot.That's exactly what i was asking for.Now time to find right chance and multipilers, btw please add your btc or clam address to this topic to receive tip