The forum is a good platform for asking or offering help with programmer mode scripts
LUA Scripts
Hello, I'm getting some good with bot. I worket a lot tunning it, working beauty. The bot implements Labouchere System, but increasing the winning chance by using the Law of Large Numbers (https://en.wikipedia.org/wiki/Law_of_large_numbers). PLEASE use simulator before use with real money. Any ideas for new bots, i'm a programmer, and i appreciate any donation to test the bots.
I like labouchere and as far as I can understand what your script does, I think it's good. But I have problem starting it, when I import script and try to run it I get following error: Comecando LUA ERROR!! [string "chunk"]:8: attempt to call global 'reseta_totais' (a nil value) Did I do something wrong?
-- Labouchere with big numbers -- https://en.wikipedia.org/wiki/Law_of_large_numbers -- ONLY CHANGE THIS: repetir = false --set TRUE if you want to restart labouchere debug = false -- END: DO NOT CHANGE ANYTHING DOWN HERE chance = (100 - site.edge)/2 --auto configures :) bethighdivisor = chance nextbet = 0.00000001 --firstbet target = balance*1.10 function reseta_totais() tothighlostinseq = 0 totlowlostinseq = 0 tothigh = 0 totlow = 0 totbets = 0 resetseed() end function imprime_lista(lista) print(table.getn(lista).." itens") for i = 1, table.getn(lista) do print (i..": "..string.format("%.8f", lista[i])) end end function status(execao) hs = totbets*0.5; ls = totbets*0.5; if debug then print("em "..totbets.." rodadas, esperado: ".. hs .." highs e "..ls.." lows") end if debug then print("tothigh: "..tothigh.." totlow: "..totlow) end dh = hs - tothigh dl = ls - totlow print(totbets..") dif high: "..dh.." dif low: "..dl) if !execao then if(dl >= dh) then bethigh = false end if(dl < dh) then bethigh = true end end end function criar_lista2() table.insert(lista, 0.00000001) table.insert(lista, 0.00000003) table.insert(lista, 0.00000002) end function criar_lista() table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000004) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000003) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000005) table.insert(lista, 0.00000002) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000004) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000003) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000005) table.insert(lista, 0.00000002) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000004) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000003) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000005) table.insert(lista, 0.00000002) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000004) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000002) table.insert(lista, 0.00000003) table.insert(lista, 0.00000001) table.insert(lista, 0.00000002) table.insert(lista, 0.00000005) table.insert(lista, 0.00000002) table.insert(lista, 0.00000001) table.insert(lista, 0.00000001) end lista = { } print("Comecando") reseta_totais() --criar a lista criar_lista() if debug then imprime_lista(lista) end function dobet() if target >= balance then stop() ching() end print ("Labouchere: "..table.getn(lista) ) execao = false totbets += 1 if(lastBet.roll > bethighdivisor) then --print("lastBet.roll: "..lastBet.roll) tothigh += 1 else totlow += 1 end if debug then print("inicio rodada nova ") end if debug then imprime_lista(lista) end -- se ganhou -- tira da lista o primeiro e o ultimo item if(win) then if debug then print("ganhou") end table.remove(lista) --ultimo if next(lista) != nil then table.remove(lista, 1) --primero end if next(lista) == nil then print ("WIN") if repetir then print ("============== RECOMEĆANDO =======") criar_lista() reseta_totais() else stop() end end else if debug then print("perdeu") end --se perder mete novo item no final da lista com a aposta anterior table.insert(lista, previousbet) if bethigh then tothighlostinseq = tothighlostinseq + 1 totlowlostinset = 0 else totlowlostinseq = totlowlostinseq + 1 tothighlostinseq = 0 end if tothighlostinseq >= 3 then bethigh = false execao = true end if totlowlostinseq >= 3 then bethigh = true execao = true end end if next(lista) != nil then --ai pega o primeiro e o ultimo item da lista , soma e aposta nextbet = lista[1] + lista[table.getn(lista)] end status(execao) if debug then print("fim rodada nova ") end end
Still not works have: 1) dif high: 0.5 dif low: -0.5 Comecando Resetting Seed! Betting Stopped! Labouchere: 88 1) dif high: -0.5 dif low: 0.5
let's learn together! look at this line: function dobet() if target >= balance then stop() ching() end you realize, the target cannot be larger the balance already? - then change words target and balance with places and it will be correct!