Hello Guest

How to keep a balance reserve that doesn't get touched?

  • 4 Replies
  • 241 Views
*

Bullseye

  • **
  • 37
  • +0/-0
    • View Profile
How to keep a balance reserve that doesn't get touched?
« on: April 20, 2020, 11:01:38 pm »
I want to keep a reserve of the balance that doesn't get touched during a run of the script.  Let's say 50% or 0.01 coin as examples

I considered this:

savebalance = balance * 0.50
or
savebalance = balance - 0.01


before the dobet(), then basing everything in the dobet() on the betbalance.  But once my goal is hit and the script stops, and i start the script again, my savebalance will be half of the NEW balance.   Is there a way to do this like i've outlined above? I don't want the savebalance to be affected by the actual FULL balance while the script is running.

Does this make sense?

*

Bullseye

  • **
  • 37
  • +0/-0
    • View Profile
Re: How to keep a balance reserve that doesn't get touched?
« Reply #1 on: April 23, 2020, 01:59:49 am »
OK, i've figured this out.  Is there a way to flag this topic as SOLVED?

SafeBank          = balance-0.006
squirreled          = balance-SafeBank

before the dobet()

Then referred to SafeBank instead of balance in the dobet() function.  This is great for testing without having to worry about bottoming out.

*

Seuntjie

  • *****
  • 481
  • +13/-2
    • View Profile
Re: How to keep a balance reserve that doesn't get touched?
« Reply #2 on: April 23, 2020, 07:41:19 am »
OK, i've figured this out.  Is there a way to flag this topic as SOLVED?

SafeBank          = balance-0.006
squirreled          = balance-SafeBank

before the dobet()

Then referred to SafeBank instead of balance in the dobet() function.  This is great for testing without having to worry about bottoming out.

Are you updating your SafeBank value as you make bets? If you don't, it will just stay the same while your balance goes up and down.

*

redotal

  • *
  • 1
  • +0/-0
    • View Profile
Re: How to keep a balance reserve that doesn't get touched?
« Reply #3 on: April 23, 2020, 11:04:03 am »
OK, i've figured this out.  Is there a way to flag this topic as SOLVED?

SafeBank          = balance-0.006
squirreled          = balance-SafeBank

before the dobet()

Then referred to SafeBank instead of balance in the dobet() function.  This is great for testing without having to worry about bottoming out.

Quote
you found solution and also you did not share the proper soultion CODE and asking to flag the topic as solved. you can just delete the whole topic

*

Seuntjie

  • *****
  • 481
  • +13/-2
    • View Profile
Re: How to keep a balance reserve that doesn't get touched?
« Reply #4 on: April 23, 2020, 11:15:27 am »

you found solution and also you did not share the proper soultion CODE and asking to flag the topic as solved. you can just delete the whole topic

Except that he did share his solution. He doesn't need to post his whole script to convey the concept and he posted the relevant code and an explanation that DOES convey the concept.

Just because you can't see how to implement the code that he posted doesn't mean the people with slightly more willpower than a tomato can't. If this is the kind of posts you intend to make, you can just leave the forum.