Bitcoin Forum
November 17, 2017, 09:26:30 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [15] 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 »
  Print  
Author Topic: Seuntjie' Dice bot programmers mode discussion.  (Read 50420 times)
chilly2k
Legendary
*
Offline Offline

Activity: 947


View Profile
August 29, 2016, 08:24:09 PM
 #281

I'm trying to modify a script to debug my script that I'm basing my script off.

This is the orignal script.

chance = 39.6
martimulti = 40
basebet = .00000001
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .01
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti
go = false
set = false


function dobet()


if (win) then
   wincount += 1
   totallose = 0
   newbalance = balance
   if (high > low) then
     bethigh = true
    else
      bethigh = false
    end
  if (wincount == 1 and go) then
     nextbet = nextwinbet
     go = false
      set = false
  else
      nextbet = basebet
  end
   if (wincount == 2 and currentprofit = <-0.00000050 previousbet != basebet) then
      if (stopnow) then stop() end
        martimulti = 40
        nextwinbet = basebet * martimulti  
        set = true
       losecount = 0
      if (balance > targetbalance) then
         invest((balance - targetbalance)+target)
         targetbalance = targetbalance + target
         newbalance = targetbalance
      end
      if (newbalance > startbalance * savefactor) then
          invest(balance-startbalance)
          targetbalance = startbalance + target
          startbalance = startbalance * savefactor
      end
   end
    if (wincount == 2) then go = true end
 else
   if (wincount == 1 and previousbet != basebet ) then
      nextwinbet = previousbet * martimulti
      martimulti = martimulti / 2
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
      print(losecount)
   else
      
   end
   wincount = 0
   totallose = totallose + 1
   if (totallose == 2) then go = true end
   nextbet = basebet
 end
  
end

------------------------------------

The following is my script.

I get the following error when I run it.

LUA ERROR!!
primary expression expected, got 'then'


chance=49.5
multiplier=2.0
base=0.00000001
nextbet = base  
wincount = 0
losecount = 0
totallose = 0
resetstats = false
function dobet()

if (win) then
   wincount += 1
    totallose = 0
   nextbet=previousbet then
   Nextbet = base  
   newbalance = balance
   
else

   wincount = 0
    totallose += 1
   nextbet=previousbet*multiplier  
   
end

      if (wincount == 2 and currentprofit = <-0.00000050 and losecount = <5) then
      if win nextbet = basebet end and                                                                         <-----  No then statement
      resetstats = true
      end
      end
      
else      
      
         if (losecount == >5 and currentprofit = >-0.00000050)  then
         if win  nextbet = basebet end and                                                                              <-----  No then statement
       resetstats = true
         end

      
end   

     
end
end


--------------------------------------------------
This is my progress so far in modifying the script to debug mine.


Why do I have this error?

LUA ERROR!!
')' expected, got '='




chance = 39.6
martimulti = 40
basebet = .00000001
startbalance = balance
nextbet = basebet
savefactor = 1.25
target = .01
targetbalance = balance + target
bethigh = true
low = 0
high = 0
losecount = 0
stopnow = false
totallose = 0
wincount = 0
nextwinbet = basebet * martimulti


function dobet()


if (win) then
   wincount += 1
   totallose = 0
   newbalance = balance
  if (wincount == 1) then
     nextbet = basebet

  end

   if (wincount == 2 and currentprofit = <-0.00000050 and losecount += 5) then         <-----  I don't think += is valid for a compare
      if (stopnow) then stop() end
        martimulti = 40
        nextwinbet = basebet * martimulti  
        set = true
       losecount = 0
      if (balance > targetbalance) then
         invest((balance - targetbalance)+target)
         targetbalance = targetbalance + target
         newbalance = targetbalance
      end
      if (newbalance > startbalance * savefactor) then
          invest(balance-startbalance)
          targetbalance = startbalance + target
          startbalance = startbalance * savefactor
      end
   end
    if (wincount == 2) then go = true end
 else
   if (wincount == 1 and previousbet != basebet ) then
      nextwinbet = previousbet * martimulti
      martimulti = martimulti / 2
      if (martimulti < 1.85) then martimulti = 1.85 end
      losecount += 1
      print(losecount)
   else
      
   end
   wincount = 0
   totallose = totallose + 1
   if (totallose == 2) then go = true end
   nextbet = basebet
 end
  
end








    See above in red

1510953990
Hero Member
*
Offline Offline

Posts: 1510953990

View Profile Personal Message (Offline)

Ignore
1510953990
Reply with quote  #2

1510953990
Report to moderator
1510953990
Hero Member
*
Offline Offline

Posts: 1510953990

View Profile Personal Message (Offline)

Ignore
1510953990
Reply with quote  #2

1510953990
Report to moderator
A blockchain platform for effective freelancing
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1510953990
Hero Member
*
Offline Offline

Posts: 1510953990

View Profile Personal Message (Offline)

Ignore
1510953990
Reply with quote  #2

1510953990
Report to moderator
1510953990
Hero Member
*
Offline Offline

Posts: 1510953990

View Profile Personal Message (Offline)

Ignore
1510953990
Reply with quote  #2

1510953990
Report to moderator
1510953990
Hero Member
*
Offline Offline

Posts: 1510953990

View Profile Personal Message (Offline)

Ignore
1510953990
Reply with quote  #2

1510953990
Report to moderator
strunberg
Sr. Member
****
Offline Offline

Activity: 434


View Profile
August 30, 2016, 02:22:27 AM
 #282

LUA ERROR!!
')' expected, got '='


chance=49.5
multiplier=2.0
base=0.00000001
nextbet = base
wincount = 0
losecount = 0
resetstats = false
function dobet()

if (win) then
   wincount += 1
   nextbet=previousbet
else
   losecount += 1
   nextbet=previousbet*multiplier    
end
      if (wincount == 2  and currentprofit = <-0.00000050 and losecount= <5) then
      if (win nextbet = basebet)
end and then                                                                    
      resetstats = true
else    
         if (losecount == >5 and currentprofit = >-0.00000050)  then
         if (win  nextbet = basebet) end and  then                                                                          
       resetstats = true
         end            
end
end



                                         ▄
                 ▄▄████████▄▄         ▄▄██
 ▄▄           ▄██▀▀        ▀▀██▄    ▄███▀
 ▀███▄▄     ▄█▀                ▀█▄▄█████▀
  ▀██████▄▄█▀                ▄▄███████▀
   ▐█████████▄           ▄▄███████████
     ▀█████████▄▄      ▄█████████████
       ▀██████████    ███████████████
        ▐▀█████████  █████████████▀ ▐▌
        ▐▌ ▀▀██████ ▐███████████▀   ▐▌
        ▐▌      ▀██ ▐█████████▀     ▐▌
         █        ▀  ██████         █
         ▐█          ▐█████▄       █▌
          ▀█▄         ▀██████▄   ▄█▀
            ▀█▄         ▀█████▌▄█▀
              ▀██▄▄       ▀▄▄██▀
                ▀▀████████▀▀
T
.ANGEL TOKEN.
[]

                                         ▄
                 ▄▄████████▄▄         ▄▄██
 ▄▄           ▄██▀▀        ▀▀██▄    ▄█▀█▀
 ▀█▀█▄▄     ▄█▀                ▀█▄▄█  ▄█▀
  ▀█  ▀▀█▄▄█▀                ▄▄██░   █▀
   ▐▄▄  ░░░▀█▄           ▄▄█▀▀░░░   ▄█
     ▀█▄ ░░░▒▒█▄▄      ▄██▒▒▒▒▒░    █
       ▀▄▄ ░░▒▒▒▓█    ██▒▒▒▒▒▒░   ▄▄█
        ▐▀█▄░░▒▒▓██  █▓▒▒▒▒▒▒░  ▄█▀ ▐▌
        ▐▌ ▀▀█▒▓███░▐█▓▒▒▒▒░░ ▄█▀   ▐▌
        ▐▌      ▀██ ▐█▓▓▒▒▄▄▄█▀     ▐▌
         █        ▀  █▓█▀▀█         █
         ▐█          ▐▄▓░ █▄       █▌
          ▀█▄         ▀█▒░ ▀█▄   ▄█▀
            ▀█▄         ▀█▄▄▄█▌▄█▀
              ▀██▄▄       ▀▄▄██▀
                 ▀▀████████▀▀
seuntjie
Legendary
*
Offline Offline

Activity: 1432



View Profile WWW
August 30, 2016, 07:51:47 AM
 #283

LUA ERROR!!
')' expected, got '='

Code:
chance=49.5
multiplier=2.0
base=0.00000001
nextbet = base
wincount = 0
losecount = 0
resetstats = false
function dobet()

if (win) then
   wincount += 1
   nextbet=previousbet
else
   losecount += 1
   nextbet=previousbet*multiplier    
end
      if (wincount == 2  and currentprofit = <-0.00000050 and losecount= <5) then
      if (win nextbet = basebet)
end and then                                                                    
      resetstats = true
else    
         if (losecount == >5 and currentprofit = >-0.00000050)  then
         if (win  nextbet = basebet) end and  then                                                                          
       resetstats = true
         end            
end
end

Please start using the code box. Valid operators for ifs:
Equals ==
Not equals !=
larger than >
smaller than <
larger or equals to >=
small or equals to <=

Programming is consistent. even though it looks mostly the same = and == does not do the same thing. >= and => does not do the same thing (in fact the one works and the other doesn't). it's extremely important to be consistent with your code otherwise it won't work. Not just with the operators, if you're using variables and it has a capital letter in one place but not in the other, it's two separate variables.

strunberg
Sr. Member
****
Offline Offline

Activity: 434


View Profile
August 30, 2016, 01:14:55 PM
 #284

LUA ERROR!!
')' expected, got '='

Code:
chance=49.5
multiplier=2.0
base=0.00000001
nextbet = base
wincount = 0
losecount = 0
resetstats = false
function dobet()

if (win) then
   wincount += 1
   nextbet=previousbet
else
   losecount += 1
   nextbet=previousbet*multiplier    
end
      if (wincount == 2  and currentprofit = <-0.00000050 and losecount= <5) then
      if (win nextbet = basebet)
end and then                                                                    
      resetstats = true
else    
         if (losecount == >5 and currentprofit = >-0.00000050)  then
         if (win  nextbet = basebet) end and  then                                                                          
       resetstats = true
         end            
end
end

Please start using the code box. Valid operators for ifs:
Equals ==
Not equals !=
larger than >
smaller than <
larger or equals to >=
small or equals to <=

Programming is consistent. even though it looks mostly the same = and == does not do the same thing. >= and => does not do the same thing (in fact the one works and the other doesn't). it's extremely important to be consistent with your code otherwise it won't work. Not just with the operators, if you're using variables and it has a capital letter in one place but not in the other, it's two separate variables.

the script now fires up in a unexpected way. Yet I think I know how to fix  this error.




                                         ▄
                 ▄▄████████▄▄         ▄▄██
 ▄▄           ▄██▀▀        ▀▀██▄    ▄███▀
 ▀███▄▄     ▄█▀                ▀█▄▄█████▀
  ▀██████▄▄█▀                ▄▄███████▀
   ▐█████████▄           ▄▄███████████
     ▀█████████▄▄      ▄█████████████
       ▀██████████    ███████████████
        ▐▀█████████  █████████████▀ ▐▌
        ▐▌ ▀▀██████ ▐███████████▀   ▐▌
        ▐▌      ▀██ ▐█████████▀     ▐▌
         █        ▀  ██████         █
         ▐█          ▐█████▄       █▌
          ▀█▄         ▀██████▄   ▄█▀
            ▀█▄         ▀█████▌▄█▀
              ▀██▄▄       ▀▄▄██▀
                ▀▀████████▀▀
T
.ANGEL TOKEN.
[]

                                         ▄
                 ▄▄████████▄▄         ▄▄██
 ▄▄           ▄██▀▀        ▀▀██▄    ▄█▀█▀
 ▀█▀█▄▄     ▄█▀                ▀█▄▄█  ▄█▀
  ▀█  ▀▀█▄▄█▀                ▄▄██░   █▀
   ▐▄▄  ░░░▀█▄           ▄▄█▀▀░░░   ▄█
     ▀█▄ ░░░▒▒█▄▄      ▄██▒▒▒▒▒░    █
       ▀▄▄ ░░▒▒▒▓█    ██▒▒▒▒▒▒░   ▄▄█
        ▐▀█▄░░▒▒▓██  █▓▒▒▒▒▒▒░  ▄█▀ ▐▌
        ▐▌ ▀▀█▒▓███░▐█▓▒▒▒▒░░ ▄█▀   ▐▌
        ▐▌      ▀██ ▐█▓▓▒▒▄▄▄█▀     ▐▌
         █        ▀  █▓█▀▀█         █
         ▐█          ▐▄▓░ █▄       █▌
          ▀█▄         ▀█▒░ ▀█▄   ▄█▀
            ▀█▄         ▀█▄▄▄█▌▄█▀
              ▀██▄▄       ▀▄▄██▀
                 ▀▀████████▀▀
chilly2k
Legendary
*
Offline Offline

Activity: 947


View Profile
August 30, 2016, 02:24:38 PM
 #285

LUA ERROR!!
')' expected, got '='

Code:
chance=49.5
multiplier=2.0
base=0.00000001
nextbet = base
wincount = 0
losecount = 0
resetstats = false
function dobet()

if (win) then
   wincount += 1
   nextbet=previousbet
else
   losecount += 1
   nextbet=previousbet*multiplier    
end
      if (wincount == 2  and currentprofit = <-0.00000050 and losecount= <5) then
      if (win nextbet = basebet)
end and then                                                                    
      resetstats = true
else    
         if (losecount == >5 and currentprofit = >-0.00000050)  then
         if (win  nextbet = basebet) end and  then                                                                          
       resetstats = true
         end            
end
end

Please start using the code box. Valid operators for ifs:
Equals ==
Not equals !=
larger than >
smaller than <
larger or equals to >=
small or equals to <=

Programming is consistent. even though it looks mostly the same = and == does not do the same thing. >= and => does not do the same thing (in fact the one works and the other doesn't). it's extremely important to be consistent with your code otherwise it won't work. Not just with the operators, if you're using variables and it has a capital letter in one place but not in the other, it's two separate variables.

the script now fires up in a unexpected way. Yet I think I know how to fix  this error.



If your code is close to the above code, I think I know what the problem is.  I'll give you a hint.  Your checking if wincount ==2.  if you don't reset that, it will only equal 2 once.  

cypher21
Hero Member
*****
Offline Offline

Activity: 490



View Profile
August 30, 2016, 03:45:28 PM
 #286

anybody program the labouchere?
want to optimize it.

strunberg
Sr. Member
****
Offline Offline

Activity: 434


View Profile
August 30, 2016, 07:05:05 PM
 #287

LUA ERROR!!
')' expected, got '='

Code:
chance=49.5
multiplier=2.0
base=0.00000001
nextbet = base
wincount = 0
losecount = 0
resetstats = false
function dobet()

if (win) then
   wincount += 1
   nextbet=previousbet
else
   losecount += 1
   nextbet=previousbet*multiplier    
end
      if (wincount == 2  and currentprofit = <-0.00000050 and losecount= <5) then
      if (win nextbet = basebet)
end and then                                                                    
      resetstats = true
else    
         if (losecount == >5 and currentprofit = >-0.00000050)  then
         if (win  nextbet = basebet) end and  then                                                                          
       resetstats = true
         end            
end
end

Please start using the code box. Valid operators for ifs:
Equals ==
Not equals !=
larger than >
smaller than <
larger or equals to >=
small or equals to <=

Programming is consistent. even though it looks mostly the same = and == does not do the same thing. >= and => does not do the same thing (in fact the one works and the other doesn't). it's extremely important to be consistent with your code otherwise it won't work. Not just with the operators, if you're using variables and it has a capital letter in one place but not in the other, it's two separate variables.

the script now fires up in a unexpected way. Yet I think I know how to fix  this error.



If your code is close to the above code, I think I know what the problem is.  I'll give you a hint.  Your checking if wincount ==2.  if you don't reset that, it will only equal 2 once.  

You're talking about resetcount ?



                                         ▄
                 ▄▄████████▄▄         ▄▄██
 ▄▄           ▄██▀▀        ▀▀██▄    ▄███▀
 ▀███▄▄     ▄█▀                ▀█▄▄█████▀
  ▀██████▄▄█▀                ▄▄███████▀
   ▐█████████▄           ▄▄███████████
     ▀█████████▄▄      ▄█████████████
       ▀██████████    ███████████████
        ▐▀█████████  █████████████▀ ▐▌
        ▐▌ ▀▀██████ ▐███████████▀   ▐▌
        ▐▌      ▀██ ▐█████████▀     ▐▌
         █        ▀  ██████         █
         ▐█          ▐█████▄       █▌
          ▀█▄         ▀██████▄   ▄█▀
            ▀█▄         ▀█████▌▄█▀
              ▀██▄▄       ▀▄▄██▀
                ▀▀████████▀▀
T
.ANGEL TOKEN.
[]

                                         ▄
                 ▄▄████████▄▄         ▄▄██
 ▄▄           ▄██▀▀        ▀▀██▄    ▄█▀█▀
 ▀█▀█▄▄     ▄█▀                ▀█▄▄█  ▄█▀
  ▀█  ▀▀█▄▄█▀                ▄▄██░   █▀
   ▐▄▄  ░░░▀█▄           ▄▄█▀▀░░░   ▄█
     ▀█▄ ░░░▒▒█▄▄      ▄██▒▒▒▒▒░    █
       ▀▄▄ ░░▒▒▒▓█    ██▒▒▒▒▒▒░   ▄▄█
        ▐▀█▄░░▒▒▓██  █▓▒▒▒▒▒▒░  ▄█▀ ▐▌
        ▐▌ ▀▀█▒▓███░▐█▓▒▒▒▒░░ ▄█▀   ▐▌
        ▐▌      ▀██ ▐█▓▓▒▒▄▄▄█▀     ▐▌
         █        ▀  █▓█▀▀█         █
         ▐█          ▐▄▓░ █▄       █▌
          ▀█▄         ▀█▒░ ▀█▄   ▄█▀
            ▀█▄         ▀█▄▄▄█▌▄█▀
              ▀██▄▄       ▀▄▄██▀
                 ▀▀████████▀▀
chilly2k
Legendary
*
Offline Offline

Activity: 947


View Profile
August 30, 2016, 07:43:21 PM
 #288

LUA ERROR!!
')' expected, got '='

Code:
chance=49.5
multiplier=2.0
base=0.00000001
nextbet = base
wincount = 0
losecount = 0
resetstats = false
function dobet()

if (win) then
   wincount += 1
   nextbet=previousbet
else
   losecount += 1
   nextbet=previousbet*multiplier    
end
      if (wincount == 2  and currentprofit = <-0.00000050 and losecount= <5) then
      if (win nextbet = basebet)
end and then                                                                    
      resetstats = true
else    
         if (losecount == >5 and currentprofit = >-0.00000050)  then
         if (win  nextbet = basebet) end and  then                                                                          
       resetstats = true
         end            
end
end

Please start using the code box. Valid operators for ifs:
Equals ==
Not equals !=
larger than >
smaller than <
larger or equals to >=
small or equals to <=

Programming is consistent. even though it looks mostly the same = and == does not do the same thing. >= and => does not do the same thing (in fact the one works and the other doesn't). it's extremely important to be consistent with your code otherwise it won't work. Not just with the operators, if you're using variables and it has a capital letter in one place but not in the other, it's two separate variables.

the script now fires up in a unexpected way. Yet I think I know how to fix  this error.



If your code is close to the above code, I think I know what the problem is.  I'll give you a hint.  Your checking if wincount ==2.  if you don't reset that, it will only equal 2 once.  

You're talking about resetcount ?

    Not sure what resetcount is.  It's not mentioned in your script.  I'm talking about setting wincount equal to 0 at some point.  IE, reset the counter, otherwise it will increment forever.  Maybe you want to reset the wincount in the loss path.  so
Code:

if win then             // IF winner
   wincount += 1
else                     // Else Loser   
   wincount = 0
end




Also you have resetstats = true.  I don't know if that does anything or not.  But, you just put a line with resetstats() and that will actually reset your stats.  

resetstats is listed under the methods/calls list.  Those are actual calls to other functions.  You code (type) the function name followed by any parms in parens.  () just means there are no parms.  It can be confusing, but your almost there.  

strunberg
Sr. Member
****
Offline Offline

Activity: 434


View Profile
August 30, 2016, 08:53:32 PM
 #289

I'm trying to set up my script so that

I keep on betting 0.00000001 until I lose.
After that it doubles my bet until I win two times in a row under 0.00000050.

If I win twice in a row under =0.00000050 I would go back to 0.00000001 .


If I don't win twice in a row  under 0.00000050 then I want to win exactly ONCE over 0.00000050 .

My major issue with my scripts is that the only way I'm able to return to 0.00000001 after rolling over 0.00000050, is that I end up having to win Twice in a row,instead of winning a single time in a row.




                                         ▄
                 ▄▄████████▄▄         ▄▄██
 ▄▄           ▄██▀▀        ▀▀██▄    ▄███▀
 ▀███▄▄     ▄█▀                ▀█▄▄█████▀
  ▀██████▄▄█▀                ▄▄███████▀
   ▐█████████▄           ▄▄███████████
     ▀█████████▄▄      ▄█████████████
       ▀██████████    ███████████████
        ▐▀█████████  █████████████▀ ▐▌
        ▐▌ ▀▀██████ ▐███████████▀   ▐▌
        ▐▌      ▀██ ▐█████████▀     ▐▌
         █        ▀  ██████         █
         ▐█          ▐█████▄       █▌
          ▀█▄         ▀██████▄   ▄█▀
            ▀█▄         ▀█████▌▄█▀
              ▀██▄▄       ▀▄▄██▀
                ▀▀████████▀▀
T
.ANGEL TOKEN.
[]

                                         ▄
                 ▄▄████████▄▄         ▄▄██
 ▄▄           ▄██▀▀        ▀▀██▄    ▄█▀█▀
 ▀█▀█▄▄     ▄█▀                ▀█▄▄█  ▄█▀
  ▀█  ▀▀█▄▄█▀                ▄▄██░   █▀
   ▐▄▄  ░░░▀█▄           ▄▄█▀▀░░░   ▄█
     ▀█▄ ░░░▒▒█▄▄      ▄██▒▒▒▒▒░    █
       ▀▄▄ ░░▒▒▒▓█    ██▒▒▒▒▒▒░   ▄▄█
        ▐▀█▄░░▒▒▓██  █▓▒▒▒▒▒▒░  ▄█▀ ▐▌
        ▐▌ ▀▀█▒▓███░▐█▓▒▒▒▒░░ ▄█▀   ▐▌
        ▐▌      ▀██ ▐█▓▓▒▒▄▄▄█▀     ▐▌
         █        ▀  █▓█▀▀█         █
         ▐█          ▐▄▓░ █▄       █▌
          ▀█▄         ▀█▒░ ▀█▄   ▄█▀
            ▀█▄         ▀█▄▄▄█▌▄█▀
              ▀██▄▄       ▀▄▄██▀
                 ▀▀████████▀▀
chilly2k
Legendary
*
Offline Offline

Activity: 947


View Profile
August 30, 2016, 09:38:05 PM
 #290

I'm trying to set up my script so that

I keep on betting 0.00000001 until I lose.
After that it doubles my bet until I win two times in a row under 0.00000050.

If I win twice in a row under =0.00000050 I would go back to 0.00000001 .


If I don't win twice in a row  under 0.00000050 then I want to win exactly ONCE over 0.00000050 .

My major issue with my scripts is that the only way I'm able to return to 0.00000001 after rolling over 0.00000050, is that I end up having to win Twice in a row,instead of winning a single time in a row.



   If you think about it logically.  If you win then,  if the previousbet is greater then .00000050 then set the nextbet equal to the base bet.  Else (if the previousbet is less then .00000050) you make nextbet equal to previousbet. 

This is how I would code it.

Code:

if (win) then
   wincount += 1
   if (previousbet < 0.00000050 and wincount != 2) then   -- only  try again if the last bet is under 50 and this is not the second win in a row
      nextbet=previousbet
   else
      nextbet = basebet
   end
else
   wincount = 0
   losecount += 1
   nextbet=previousbet*multiplier     
end


     if you wanted to stop a loosing streak, I would add something on the  loss side of that if statement. 

 

strunberg
Sr. Member
****
Offline Offline

Activity: 434


View Profile
August 31, 2016, 01:14:35 AM
 #291

Once I use stop() how would I restart the betting once more without going into the console to manually activate the betting?



Code:
nextbet = base
wincount = 0
losecount = 0
stopnow = false
resetstats = false
function dobet()
if (win) then
   wincount += 1
   if (previousbet < 0.00000050 and wincount != 2) then   -- only  try again if the last bet is under 50 and this is not the second win in a row
      nextbet=previousbet
   else
      nextbet = basebet
   end
else
   wincount = 0
   losecount += 1
   nextbet=previousbet*multiplier     
end
  if (wincount == 2 and previousbet != basebet) then
      if (stopnow) then stop() end
        nextbet = 0.00000001
        set = true
       losecount = 0

end

end
end



                                         ▄
                 ▄▄████████▄▄         ▄▄██
 ▄▄           ▄██▀▀        ▀▀██▄    ▄███▀
 ▀███▄▄     ▄█▀                ▀█▄▄█████▀
  ▀██████▄▄█▀                ▄▄███████▀
   ▐█████████▄           ▄▄███████████
     ▀█████████▄▄      ▄█████████████
       ▀██████████    ███████████████
        ▐▀█████████  █████████████▀ ▐▌
        ▐▌ ▀▀██████ ▐███████████▀   ▐▌
        ▐▌      ▀██ ▐█████████▀     ▐▌
         █        ▀  ██████         █
         ▐█          ▐█████▄       █▌
          ▀█▄         ▀██████▄   ▄█▀
            ▀█▄         ▀█████▌▄█▀
              ▀██▄▄       ▀▄▄██▀
                ▀▀████████▀▀
T
.ANGEL TOKEN.
[]

                                         ▄
                 ▄▄████████▄▄         ▄▄██
 ▄▄           ▄██▀▀        ▀▀██▄    ▄█▀█▀
 ▀█▀█▄▄     ▄█▀                ▀█▄▄█  ▄█▀
  ▀█  ▀▀█▄▄█▀                ▄▄██░   █▀
   ▐▄▄  ░░░▀█▄           ▄▄█▀▀░░░   ▄█
     ▀█▄ ░░░▒▒█▄▄      ▄██▒▒▒▒▒░    █
       ▀▄▄ ░░▒▒▒▓█    ██▒▒▒▒▒▒░   ▄▄█
        ▐▀█▄░░▒▒▓██  █▓▒▒▒▒▒▒░  ▄█▀ ▐▌
        ▐▌ ▀▀█▒▓███░▐█▓▒▒▒▒░░ ▄█▀   ▐▌
        ▐▌      ▀██ ▐█▓▓▒▒▄▄▄█▀     ▐▌
         █        ▀  █▓█▀▀█         █
         ▐█          ▐▄▓░ █▄       █▌
          ▀█▄         ▀█▒░ ▀█▄   ▄█▀
            ▀█▄         ▀█▄▄▄█▌▄█▀
              ▀██▄▄       ▀▄▄██▀
                 ▀▀████████▀▀
strunberg
Sr. Member
****
Offline Offline

Activity: 434


View Profile
August 31, 2016, 06:11:06 AM
 #292

Thank you everyone so much for helping out!



Code:
chance=49.5
multiplier=2.0
base=0.00000001
nextbet = base
wincount = 0
losecount = 0
stopnow = false
resetstats = false
function dobet()
if (win) then
   wincount += 1
   if (previousbet < 0.00000050 and wincount != 2) then   -- only  try again if the last bet is under 50 and this is not the second win in a row
      nextbet=previousbet
   else
      nextbet = basebet
   end
else
   wincount = 0
   losecount += 1
   nextbet=previousbet*multiplier    
end
  if (wincount == 2 and previousbet != basebet) then
      if (stopnow) then stop() end
        nextbet = 0.00000001
        set = true
       losecount = 0
end
 if (losecount  >= 5 and currentprofit  >= -0.00000050)  then
         if win then if (stopnow) then stop() end
        nextbet = 0.00000001
        set = true
       losecount = 0
         end  


end
end



                                         ▄
                 ▄▄████████▄▄         ▄▄██
 ▄▄           ▄██▀▀        ▀▀██▄    ▄███▀
 ▀███▄▄     ▄█▀                ▀█▄▄█████▀
  ▀██████▄▄█▀                ▄▄███████▀
   ▐█████████▄           ▄▄███████████
     ▀█████████▄▄      ▄█████████████
       ▀██████████    ███████████████
        ▐▀█████████  █████████████▀ ▐▌
        ▐▌ ▀▀██████ ▐███████████▀   ▐▌
        ▐▌      ▀██ ▐█████████▀     ▐▌
         █        ▀  ██████         █
         ▐█          ▐█████▄       █▌
          ▀█▄         ▀██████▄   ▄█▀
            ▀█▄         ▀█████▌▄█▀
              ▀██▄▄       ▀▄▄██▀
                ▀▀████████▀▀
T
.ANGEL TOKEN.
[]

                                         ▄
                 ▄▄████████▄▄         ▄▄██
 ▄▄           ▄██▀▀        ▀▀██▄    ▄█▀█▀
 ▀█▀█▄▄     ▄█▀                ▀█▄▄█  ▄█▀
  ▀█  ▀▀█▄▄█▀                ▄▄██░   █▀
   ▐▄▄  ░░░▀█▄           ▄▄█▀▀░░░   ▄█
     ▀█▄ ░░░▒▒█▄▄      ▄██▒▒▒▒▒░    █
       ▀▄▄ ░░▒▒▒▓█    ██▒▒▒▒▒▒░   ▄▄█
        ▐▀█▄░░▒▒▓██  █▓▒▒▒▒▒▒░  ▄█▀ ▐▌
        ▐▌ ▀▀█▒▓███░▐█▓▒▒▒▒░░ ▄█▀   ▐▌
        ▐▌      ▀██ ▐█▓▓▒▒▄▄▄█▀     ▐▌
         █        ▀  █▓█▀▀█         █
         ▐█          ▐▄▓░ █▄       █▌
          ▀█▄         ▀█▒░ ▀█▄   ▄█▀
            ▀█▄         ▀█▄▄▄█▌▄█▀
              ▀██▄▄       ▀▄▄██▀
                 ▀▀████████▀▀
BigMat
Newbie
*
Offline Offline

Activity: 4


View Profile
August 31, 2016, 10:36:59 PM
 #293

I want to set automatic my strategy, but i have one problem, the base bet is 0.00000001 and chance 42%. When hit 6 lose streak the base bet change to 0.00000100, and if i lose again, and hit 7 lose streak, the base bet reset to 0.00000001 and the next 6 lose streak the base bet will change to 0.00000200 (double). The problem is, everything is automatic, less the double part, so how i double the "increased" bet if i lose the 7 time?

Strategy Example:

win - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000100
win - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000200
lose - 0.00000001
win -  0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
win - 0.00000400
lose - 0.00000001
win -  0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
lose - 0.00000001
win - 0.00000100

Configured in "Advanced Mode":
http://image.prntscr.com/image/d205c40823b649f59696eac09bb49a8e.png
http://image.prntscr.com/image/7185b151672948a2a1797f8f63a95836.png

I tried these codes:
Code:
function dobet()

baseBet=0.00000001
streakBet1=0.0000001

if win then

 nextbet=0.00000001

else

 nextbet=baseBet

end
if currentstreak==-6 then

 nextbet=streakBet1

if win then

streakBet1=0.0000001

else

setvalueint(streakBet1,double)

end

end

end

end

and

Code:
function dobet()

baseBet=0.00000001
streakBet1=0.0000001

if win then

 nextbet=0.00000001

else

 nextbet=baseBet

end
if currentstreak==-6 then

 nextbet=streakBet1

if win then

streakBet1=0.0000001

else

streakBet1=streakBet1*2

end

end

end

end
B4RF
Hero Member
*****
Offline Offline

Activity: 730


View Profile
September 01, 2016, 12:05:03 AM
 #294

-snip-

Try this one

Code:

baseBet = 0.00000001
streakBet = 0.000001
streak = 0

function dobet()

if previousbet>baseBet then
  nextBet = baseBet

  if win then
    streakBet = 0.000001
  else
    streakBet = streakBet*2
  end

else
  if win then
    streak = 0

    nextbet=baseBet
  else
    streak = streak+1

    if streak==6 then
      nextbet=streakBet
  end
end

But betting after a losing streak doesn't change your odds at all... Roll Eyes

BigMat
Newbie
*
Offline Offline

Activity: 4


View Profile
September 01, 2016, 01:22:13 AM
 #295

-snip-

Try this one

Code:

baseBet = 0.00000001
streakBet = 0.000001
streak = 0

function dobet()

if previousbet>baseBet then
  nextBet = baseBet

  if win then
    streakBet = 0.000001
  else
    streakBet = streakBet*2
  end

else
  if win then
    streak = 0

    nextbet=baseBet
  else
    streak = streak+1

    if streak==6 then
      nextbet=streakBet
  end
end

But betting after a losing streak doesn't change your odds at all... Roll Eyes

Error in the code, something about "end problem".

Image: http://image.prntscr.com/image/d8153fb72df64a56882251e1c7bbe62f.png
chilly2k
Legendary
*
Offline Offline

Activity: 947


View Profile
September 01, 2016, 02:20:34 AM
 #296

-snip-

Try this one

Code:

baseBet = 0.00000001
streakBet = 0.000001
streak = 0

function dobet()

if previousbet>baseBet then
  nextBet = baseBet

  if win then
    streakBet = 0.000001
  else
    streakBet = streakBet*2
  end

else
  if win then
    streak = 0

    nextbet=baseBet
  else
    streak = streak+1

    if streak==6 then
      nextbet=streakBet
  end
end

But betting after a losing streak doesn't change your odds at all... Roll Eyes

Error in the code, something about "end problem".

Image:

  Add an "end" at the end.  He just missed the last end to close the function when he cut/pasted.  

BigMat
Newbie
*
Offline Offline

Activity: 4


View Profile
September 01, 2016, 02:35:18 AM
 #297

-snip-

Try this one

Code:

baseBet = 0.00000001
streakBet = 0.000001
streak = 0

function dobet()

if previousbet>baseBet then
  nextBet = baseBet

  if win then
    streakBet = 0.000001
  else
    streakBet = streakBet*2
  end

else
  if win then
    streak = 0

    nextbet=baseBet
  else
    streak = streak+1

    if streak==6 then
      nextbet=streakBet
  end
end

But betting after a losing streak doesn't change your odds at all... Roll Eyes

Error in the code, something about "end problem".

Image: http://image.prntscr.com/image/d8153fb72df64a56882251e1c7bbe62f.png

  Add an "end" at the end.  He just missed the last end to close the function when he cut/pasted.  

Still occur the same error.
seuntjie
Legendary
*
Offline Offline

Activity: 1432



View Profile WWW
September 01, 2016, 06:07:33 AM
 #298

-snip-

Try this one

Code:

baseBet = 0.00000001
streakBet = 0.000001
streak = 0

function dobet()

if previousbet>baseBet then
  nextBet = baseBet

  if win then
    streakBet = 0.000001
  else
    streakBet = streakBet*2
  end

else
  if win then
    streak = 0

    nextbet=baseBet
  else
    streak = streak+1

    if streak==6 then
      nextbet=streakBet
  end
end

But betting after a losing streak doesn't change your odds at all... Roll Eyes

Error in the code, something about "end problem".

Image:

  Add an "end" at the end.  He just missed the last end to close the function when he cut/pasted.  

Still occur the same error.

Make sure every if/if-else and function has a matching end

B4RF
Hero Member
*****
Offline Offline

Activity: 730


View Profile
September 01, 2016, 09:42:35 AM
 #299

-snip-

Still occur the same error.

I haven't actually tried the code yesterday but now I have and changed all the errors

Code:
baseBet = 0.00000001
streakBet = 0.000001
streak = 0
nextbet = baseBet

function dobet()

if (previousbet>baseBet) then
  nextbet = baseBet

  if win then
    streakBet = 0.000001
  else
    streakBet = streakBet*2
  end

else
  if win then
    streak = 0

    nextbet=baseBet
  else
    streak = streak+1

    if streak==6 then
      nextbet=streakBet
    end
  end
end

end


Sorry for the wrong version  Sad

broutille
Newbie
*
Offline Offline

Activity: 3


View Profile
September 02, 2016, 01:20:54 PM
 #300

Is there any way I can draw custom dots on the chart?
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [15] 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!