Hello Guest

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

  • 6 Replies
  • 1614 Views
*

Bullseye

  • **
  • 36
  • +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

  • **
  • 36
  • +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

  • *****
  • 593
  • +17/-3
    • 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

  • *****
  • 593
  • +17/-3
    • 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.


*

parisd

  • **
  • 20
  • +0/-0
    • View Profile
Re: How to keep a balance reserve that doesn't get touched?
« Reply #5 on: December 21, 2020, 04:39:45 pm »
It seems from trying to use SafeBank in my script that it is not a function that will limit the loses in your account to less than that SafeBank, I mean if by mistake you make a large bet, as long as your balance is still bigger than the bet, it will be executed.

Is there a kind of SafeBank that make the bot believe the SafeBank is the account balance and that will  stop betting as soon as the bet size is bigger than that "SafeBank" ?

Tks

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.

*

Seuntjie

  • *****
  • 593
  • +17/-3
    • View Profile
Re: How to keep a balance reserve that doesn't get touched?
« Reply #6 on: December 21, 2020, 05:05:09 pm »
The lower Limit setting in the advanced mode will stop the bot if losing your next bet will put you below that threshold.


You can configure it in the advanced mode and set "enablesrc=true" in the programmer mode to use that functionality in your script. Be sure to disable any other stop or reset conditions in the advanced mode that you don't want to use, as they will be applied as well. (Resetting in this case reset the built in functions, not your script)

Alternatively, you can just compare your balance- nextbet to your safebank.

Code: [Select]
if (balance-nextbet<safebank) then stop() endThis will behave the same as the functionality described above.