Hello Guest

Adding Check for Worst Losing Streak

  • 2 Replies
  • 144 Views
*

karmacoin

  • *
  • 2
  • +0/-0
    • View Profile
Adding Check for Worst Losing Streak
« on: March 10, 2019, 12:46:48 am »
Hello All,

Good day to you. I wanted some help with the code here.

After the point where the seed is reset, I wanted to check for 'Worst Losing Streak' and if it is greater that a specified value, the bot would stop betting. In principle something like below

-------
if
Worst Losing Streak >25
stop()
----------



Code: [Select]
chance = 90
bethigh = true
basebet = balance/4000
nextbet = basebet



--set targets
amount= 150000.05               -- Amount to withdraw
profittarget= 150000.000      -- Set max Balance to start withdraw
stoptarget= .00000001           -- Set min Balance to stop script





function dobet()
if (win) then
chance = 90
basebet = balance/4000
    nextbet = basebet
else
if chance == 25.00  then
nextbet = previousbet * 1.33738
else
chance = 25.00
    nextbet = basebet/3.3
print("-----------------------------------------")
print(" ")
print("You Won ") print(profit) print(" for this Session")
print(" ")
print("Your Balance is ") print(balance)
print(" ")
print("-----------------------------------------")
resetseed();
end
end





 
if balance <= stoptarget then
stop()
end
 
if (balance) >= profittarget then

  ching()
  alarm() 
  print("Your Balance is ") print(balance)
  print(" ")
  print("TARGET ACHIEVED GO NEXT!!!")
  print(" ")
  print("TARGET ACHIEVED GO NEXT!!!")
  print(" ")
  print("TARGET ACHIEVED GO NEXT!!!")
  print(" ")
  print("TARGET ACHIEVED GO NEXT!!!")
  print(" ")
  print("You Won ") print(profit) print(" for this Session")
  print(" ")
  print("Withdrawing Target Amount ") print(amount) print("BTC")
 
 

  --withdraw(amount,"1cTaNT2HkNa8HS7ZWhS5kfstvhMvznxBv")


  print(" ")
  print("CONTINUING TO WIN MORE!!!")

 
  resetseed();



end

end

« Last Edit: March 10, 2019, 07:59:26 am by Seuntjie »

*

Seuntjie

  • *****
  • 261
  • +2/-2
    • View Profile
Re: Adding Check for Worst Losing Streak
« Reply #1 on: March 10, 2019, 04:40:47 pm »
Quote
-------
if
Worst Losing Streak >25
stop()
----------

Well, this is a step in the right direction. Just fix the syntax for lua. You can learn a bit more about if statements and variables using the steemit tutorials in https://forum.seuntjie.com/index.php?topic=2.0

Code: [Select]
if worststreak>25 then
stop()
end

and you have to track the worst streak. I'm not going to give you the code for how to write it, but i'll give you a hint so you can try to write it yourself and learn from it.

You need to check if the streak you're currently having is worse than your worst one, and if it is worse, then update what you know to be the worst streak with the new value. Again, be sure to go through the tutorials. It covers the basic of variables and if statements and tells you what variables are available in the bot and what their values mean.

*

karmacoin

  • *
  • 2
  • +0/-0
    • View Profile
Re: Adding Check for Worst Losing Streak
« Reply #2 on: March 10, 2019, 09:32:49 pm »
thanks,

let me have a go at it.