0% found this document useful (0 votes)
299 views17 pages

The Infinite Code Je Taime Edition V 1.1

This document contains the code for a betting simulation. It defines variables to track the balance, bets placed, and outcomes. Functions are included to calculate bet amounts, track win/loss streaks on different odds, and optimize the betting strategy. The code simulates placing bets in a loop, tracking performance metrics and printing updates periodically.

Uploaded by

dishandshah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
299 views17 pages

The Infinite Code Je Taime Edition V 1.1

This document contains the code for a betting simulation. It defines variables to track the balance, bets placed, and outcomes. Functions are included to calculate bet amounts, track win/loss streaks on different odds, and optimize the betting strategy. The code simulates placing bets in a loop, tracking performance metrics and printing updates periodically.

Uploaded by

dishandshah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 17

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

-----------------------------
-- The Infinite code je t'aime edition by mrbtcgambler(tm) & community - 7th Jan
2022 Version 1.1 --
-----------------------------------------------------------------------------------
-----------------------------

resetstats ()
--balance = 100; currency = "XRP" -- uncomment if in simulation mode
or it will calculate profit target wrong
StartBalance = balance
RiskLevel = 2 -- Enter 1 for high risk, 2 for medium and 3 for low risk
Stage = 1-- Sets the initial Stage
TW = 0 -- Total Wager Count
TB = 0 -- Total Bets Count
LoseStreak = 0 -- Set this value when to switch over under after x losses
WinStreak = 0 -- Set this value when to switch over under after x Wins
BaseBet = 0
BaseBet2 = balance / 10000
ProfitTarget = balance * 1 -- Profit target of 100% of balance
Switch2Stage2 = balance * 0.001 * -1 -- sets the switch to stage 2 at 0.06%
of balance loss
Switch2Stage1 = balance * 0.0005 -- sets the switch to stage 1 at 0.07% of
balance win
chance = 49.5
printStatsEveryXBets = 1000
initialbalance = balance
previousBetClone = 0
FakeBalance = StartBalance
Flag = 1
LossRun = 1
WinRun = 1
MyPreviousBet = base
BaseChance = 19.8
BetCounter = 0
chance = 49.5
nextbet = base
betcalc = 0.1420417
enablezz = false
enablesrc = false
bestTOUMX = 0 --memorize the proba of the best channel
n = 0
N = 0
n = 1
bestchain = 0 --memorizes the value of the rarest series
indice = 1 --index of the rarest series at the last control
pr = 0 --memorize profit / progress
prinitiale = pr
wagered = 0
bets = 0

div = 100000000 ---------------basic unit


--balance = 10000 --simulation, to be removed if playing in real life
frequence_affichage = 10 --displays simulation info every 100 bets for example
--____________________SETTINGS______
agressivite = 17 --[[increases/decreases martingales' best minimum increase
for instance with multiplier=2 and aggressivite = 50 after every loses, wager are
increase by 150%) ]]--
casino = 1 --% edge house
chancePRLL = 88 --chance to pre roll
maxchance = 44 -- max chance authorized
minchance = 0.3 --minimum chance authorized
NBRchance = 100 --number of chance analyzed
target = balance*2 --STOP_IF_BALANCE_OVER
limite = 0 --STOP_IF_BALANCE_UNDER
bb = balance / 1300000 -------------------base bet
bbPRLL = bb/2 --pre roll base bet
NBM = 44 --[[probability of the series
(for instance with NBM=100 we are looking for series that have 1 chance in
100 ) ]]--
--_________________________________

B=balance-limite---this is the part of the balance involved

--REMPLISSAGE DES TABLES_____________________________________________


Tch={} --luck
Tover={} --lose over chain
Tunder={} --lose under chain
TOUMX={} --biggest chain between over / under
Tsens={} --memorize meaning of each string
Tn={} --chain lose min

A = minchance-((maxchance-minchance)/(NBRchance-1))
for x=1,NBRchance,1 do --Fill in the table selected the odds
A +=(maxchance-minchance)/(NBRchance-1)
Tch[x] = A --luck
Tover[x]=0 --lose over chain
Tunder[x]=0 --lose over chain
TOUMX[x]=0 --biggest chain between over / under
Tn[x]=0 --chain lose min
Tsens[x]=0 --memorize meaning of each string
end

--[[ for x=1,NBRchance,1 do --table series win min


if Tch[x]==nil then break end
Tn[x]=math.ceil(math.log(1/NBM)/math.log((Tch[x])/100))
end --]]

for x=1,NBRchance,1 do --table serie lose min


if Tch[x]==nil then break end
Tn[x]=math.ceil(math.log(1/NBM)/math.log((100-Tch[x])/100))
end

x=0

function calcul_increase()

payout=(100 - casino)/chance
q=((1+(1/(payout-1)))-1)*(1+(agressivite/100))+1
inc=(q-1)*100

end

MRTGLLOPT=false
function martingale_optimise() --optimizing the base bet to use 100% of the balance

if (lastBet.profit >= 0) then -- if win


B=balance-limite-0.00000001
n = math.log((B/bb)*(-1+q)+1)/math.log(q) -- number of cashable loses
n=math.floor(n) -- whole number
nextbet=B/((1-q^n)/(1-q)) -- bet maximum amount to cash these "n" loses
else
nextbet = previousbet*q
end

--print("INCREASE= " ..inc .."%")


--print("MAX SERIES OF LOSE POSSIBLE= " ..n-1 )

end

function reset_to_preroll()

if (lastBet.profit >= 0) then -- if win then


if bestTOUMX < Tn[indice] then
chance=chancePRLL
nextbet=bbPRLL
MRTGLLOPT=false
end
end --return to preroll after win

end

function cherche_serie_de_win()
for x=1,NBRchance,1 do

if Tch[x]==nil then break end

if lastBet.roll < Tch[x] then


Tunder[x] = Tunder[x] +1
else
Tunder[x] =0
end

if lastBet.roll > (100-Tch[x]-0.01) then


Tover[x] = Tover[x] + 1
else
Tover[x] =0
end

if Tunder[x] >= Tover[x] then


TOUMX[x]=Tunder[x]
Tsens[x]=false
else
TOUMX[x]=Tover[x]
Tsens[x]=true
end
end
end

function cherche_serie_de_lose()
for x=1,NBRchance,1 do

if Tch[x]==nil then break end

if lastBet.roll < Tch[x] then


Tunder[x] =0
else
Tunder[x] = Tunder[x] + 1
end

if lastBet.roll > (100-Tch[x]-0.01) then


Tover[x] =0
else
Tover[x] = Tover[x] + 1
end

if Tunder[x] >= Tover[x] then


TOUMX[x]=Tunder[x]
Tsens[x]=false
else
TOUMX[x]=Tover[x]
Tsens[x]=true
end
end
end

function selection_indice_de_la_best_serie_win()
for x=1,NBRchance,1 do

if Tch[x]==nil then break end


if (1/(((Tch[x])/100)^TOUMX[x])) > bestchain then
bestchain=(1/(((Tch[x])/100)^TOUMX[x]))
indice=x
bestTOUMX=TOUMX[indice]
end
end
if bestTOUMX >= Tn[indice] and (lastBet.profit >= 0) then
MRTGLLOPT=true
bestchain=0 --to keep in memory even if the series is broken
chance=Tch[indice]
bethigh=Tsens[indice]
end
end

function selection_indice_de_la_best_serie_lose()
for x=1,NBRchance,1 do

if Tch[x]==nil then break end


if (1/(((100-Tch[x])/100)^TOUMX[x])) > bestchain then
bestchain=(1/(((100-Tch[x])/100)^TOUMX[x]))
indice=x
bestTOUMX=TOUMX[indice]
end
end
if bestTOUMX >= Tn[indice] and ((lastBet.profit >= 0) or chance==chancePRLL)
then
MRTGLLOPT=true
chance=Tch[indice]
bethigh=Tsens[indice]
end
end

function limiteSTOP(target,limite)
if balance > target then
simuInfo()
print("TARGET REACHED !!!!!!!!!!!!!!")
--stop()
elseif balance-nextbet < limite then
simuInfo()
print(".............................")
--stop()
end
end

bbDB = bb
startbank = balance
wagered = wagered + nextbet

function simuInfo()
-- print("#=========================================#")
-- print(" #---===--- Script name ---===---#
")
-- print("#=========================================#")
-- print("# [Starting bank = " ..string.format("%9.8f", startbank) .. " ]-")
-- print("# [Base bet = " ..string.format("%9.8f", bbDB) .. " ]-")
-- print("#=========================================#")
-- print("# [Chance: " ..string.format("%9.8f", chance) .. " ]-")
-- print("# [nextbet: " ..string.format("%9.8f", nextbet) .." ROLL n°
" ..bets .." ]-")
--
print("#---------------------------------------------------------------------------
-------#")
-- print("# [profit: " ..string.format("%9.8f", profit) .." (balance
x" ..string.format("%2.2f",((balance)/(startbank))) ..") ]-")
-- print("# [Max brought into play: " ..string.format("%9.8f", maxUse) ..
" ]-")
-- print("# [wagered: " ..string.format("%9.8f", wagered) .."
(" ..string.format("%2.2f",wagered/(startbank)) .." x start balance) ]-")
-- print("# [Avg profit/bet: " ..string.format("%9.8f", profit/bets/bbDB) .." x
base bet ]-")
-- print("# [Avg wag/bet: " ..string.format("%9.8f", wagered/bets) .." ]-")
-- print("# [PROFIT MAX= " ..bestID .." ]-")
-- print("# [PERTE MAX= " ..badID .." ]-")
-- print("#=========================================#\n\n\n")
end

perteP = 0
p = false
maxUse = 0
bestID,badID,pirePERTE,bestPROFIT=0,0,0,0
function calculPrint()
if p == true then
--print(balance)
-- print(chance)
-- print(nextbet)
-- print(coef)
end

perteP +=currentprofit
if perteP >= 0 then perteP = 0 end

if -perteP + nextbet > maxUse then maxUse = -perteP + nextbet end

if bets%frequence_affichage==0 then
simuInfo()
end

if currentprofit >= bestPROFIT then


bestID = lastBet.id
bestPROFIT = currentprofit
end

if currentprofit <= pirePERTE then


badID = lastBet.id
pirePERTE = currentprofit
end
end

chance=chancePRLL
nextbet=bbPRLL

debugg = false
bets = previousbet

--*******************************************************************
if (RiskLevel == 1) then
BaseBet = (balance / 1000)
end

if (RiskLevel == 2) then
BaseBet = (balance / 10000)
end

if (RiskLevel == 3) then
BaseBet = (balance / 100000)
end

function setStage(stageNumber)
print("\n\n#=========================================#")
print(" Switching to stage " .. stageNumber)
print("#=========================================#\n\n")
Stage = stageNumber
end

function setStage1()
setStage(1)

chance = 49.5
base = BaseBet
LoseStreak = math.random(2, 8) - 10
WinStreak = math.random(4, 8)
nextbet = base
previousBetClone = base
end

function setStage2()
setStage(2)

chance = chancePRLL
nextbet = bbPRLL
end
function printStats()
-- print("\n\n#=========================================#")
-- print(" STATS ")
-- print("#=========================================#")
-- print("# Stage: " .. Stage)
-- print("# Bets: " .. TB)
-- print("# Balance: " .. string.format("%9.8f", balance) .. " " ..
string.upper(currency))
-- print("# Profit: " .. string.format("%9.8f", profit) .. " " ..
string.upper(currency))
-- print("# Wagered: " .. string.format("%9.8f", TW) .. " " ..
string.upper(currency) .. " (" .. string.format("%2.2f", TW/initialbalance) .. "x
start balance)")
-- print("# Avg wag/bet: " .. string.format("%9.8f", TW/TB) .. " " ..
string.upper(currency))

if (Stage == 2) then
-- print("# Progress in Stage 2: " .. string.format("%3.2f",
((math.abs(profit) / Switch2Stage1) * 100)) .. "%")
end

-- print("#=========================================#\n\n")
end

function dobet()
bets = bets + 1

if (TB % printStatsEveryXBets == 0) then


printStats()
end

TW += previousBetClone -- adds previous bet to total wagered (TW) use print


(TW) in console to see total wagered
TB += 1 -- keeps a count of total bets print (TB) in console to see total
number of bets

if (profit >= ProfitTarget) then


print("\n\nStopped win - deposit 50% of balance to vault")
print(string.format("Total Wagered: %.8f", TW))
print(string.format("Total Bets: %d", TB))
--stop()
end

if (Stage == 2) then
if (debugg == true) then
if (bethigh == true) then
sens24 = "over" else sens24 = "under"
end
if (win) then
gain24 = " win"
else
gain24 = "lose"
end

-- print("================================")
-- print("=[Amount" .." ][ " .."sens" .." ][ " .."Chance" .." ]
[ " .."gain]=")
-- print("=[" ..string.format("%9.2f",previousbet) .." ]
[ " ..sens24 .." ][ "..string.format("%1.2f",chance).." ]
[ "..gain24 .." ]=")
-- print("================================")
end

pr = pr +currentprofit

cherche_serie_de_lose()
--cherche_serie_de_win()

bestchain=0
selection_indice_de_la_best_serie_lose()
--selection_indice_de_la_best_serie_win()

reset_to_preroll()

if MRTGLLOPT==true then
calcul_increase()
martingale_optimise()
end

calculPrint()
limiteSTOP(target,limite)

if (profit >= Switch2Stage1) then


setStage1()
return
end
end

if (Stage == 1) then
chance = 49.5
base = BaseBet
LoseStreak = math.random(2, 8)-10
WinStreak = math.random(4, 8)

if (profit <= Switch2Stage2) then


setStage2()

return
end

if (win) then
nextbet = previousBetClone * 2
else
nextbet = base
end

if (currentstreak >= 3) then


nextbet = base
end

if (currentstreak >= WinStreak) then


bethigh = !bethigh
end

if (currentstreak <= LoseStreak) then


bethigh = !bethigh
end
end

previousBetClone = nextbet
end--------------------------------------------------------------------------------
--------------------------------
-- The Infinite code je t'aime edition by mrbtcgambler(tm) & community - 7th Jan
2022 Version 1.0 --
-----------------------------------------------------------------------------------
-----------------------------

resetstats ()
balance = 100; currency = "XRP" -- uncomment if in simulation mode or
it will calculate profit target wrong
StartBalance = balance
RiskLevel = 2 -- Enter 1 for high risk, 2 for medium and 3 for low risk
Stage = 1-- Sets the initial Stage
TW = 0 -- Total Wager Count
TB = 0 -- Total Bets Count
LoseStreak = 0 -- Set this value when to switch over under after x losses
WinStreak = 0 -- Set this value when to switch over under after x Wins
BaseBet = 0
BaseBet2 = balance / 10000
ProfitTarget = balance * 1 -- Profit target of 100% of balance
Switch2Stage2 = balance * 0.001 * -1 -- sets the switch to stage 2 at 0.06%
of balance loss
Switch2Stage1 = balance * 0.0005 -- sets the switch to stage 1 at 0.07% of
balance win
chance = 49.5
printStatsEveryXBets = 1000
initialbalance = balance
previousBetClone = 0
FakeBalance = StartBalance
Flag = 1
LossRun = 1
WinRun = 1
MyPreviousBet = base
BaseChance = 19.8
BetCounter = 0
chance = 49.5
nextbet = base
betcalc = 0.1420417
enablezz = false
enablesrc = false
bestTOUMX = 0 --memorize the proba of the best channel
n = 0
N = 0
n = 1
bestchain = 0 --memorizes the value of the rarest series
indice = 1 --index of the rarest series at the last control
pr = 0 --memorize profit / progress
prinitiale = pr
wagered = 0
bets = 0

div = 100000000 ---------------basic unit


--balance = 10000 --simulation, to be removed if playing in real life
frequence_affichage = 10 --displays simulation info every 100 bets for example
--____________________SETTINGS______
agressivite = 17 --[[increases/decreases martingales' best minimum increase
for instance with multiplier=2 and aggressivite = 50 after every loses, wager are
increase by 150%) ]]--
casino = 1 --% edge house
chancePRLL = 88 --chance to pre roll
maxchance = 44 -- max chance authorized
minchance = 0.3 --minimum chance authorized
NBRchance = 100 --number of chance analyzed
target = balance*2 --STOP_IF_BALANCE_OVER
limite = 0 --STOP_IF_BALANCE_UNDER
bb = balance / 1300000 -------------------base bet
bbPRLL = bb/2 --pre roll base bet
NBM = 44 --[[probability of the series
(for instance with NBM=100 we are looking for series that have 1 chance in
100 ) ]]--
--_________________________________

B=balance-limite---this is the part of the balance involved

--REMPLISSAGE DES TABLES_____________________________________________


Tch={} --luck
Tover={} --lose over chain
Tunder={} --lose under chain
TOUMX={} --biggest chain between over / under
Tsens={} --memorize meaning of each string
Tn={} --chain lose min

A = minchance-((maxchance-minchance)/(NBRchance-1))
for x=1,NBRchance,1 do --Fill in the table selected the odds
A +=(maxchance-minchance)/(NBRchance-1)
Tch[x] = A --luck
Tover[x]=0 --lose over chain
Tunder[x]=0 --lose over chain
TOUMX[x]=0 --biggest chain between over / under
Tn[x]=0 --chain lose min
Tsens[x]=0 --memorize meaning of each string
end

--[[ for x=1,NBRchance,1 do --table series win min


if Tch[x]==nil then break end
Tn[x]=math.ceil(math.log(1/NBM)/math.log((Tch[x])/100))
end --]]

for x=1,NBRchance,1 do --table serie lose min


if Tch[x]==nil then break end
Tn[x]=math.ceil(math.log(1/NBM)/math.log((100-Tch[x])/100))
end

x=0

function calcul_increase()

payout=(100 - casino)/chance
q=((1+(1/(payout-1)))-1)*(1+(agressivite/100))+1
inc=(q-1)*100

end

MRTGLLOPT=false
function martingale_optimise() --optimizing the base bet to use 100% of the balance
if (lastBet.profit >= 0) then -- if win
B=balance-limite-0.00000001
n = math.log((B/bb)*(-1+q)+1)/math.log(q) -- number of cashable loses
n=math.floor(n) -- whole number
nextbet=B/((1-q^n)/(1-q)) -- bet maximum amount to cash these "n" loses
else
nextbet = previousbet*q
end

--print("INCREASE= " ..inc .."%")


--print("MAX SERIES OF LOSE POSSIBLE= " ..n-1 )

end

function reset_to_preroll()

if (lastBet.profit >= 0) then -- if win then


if bestTOUMX < Tn[indice] then
chance=chancePRLL
nextbet=bbPRLL
MRTGLLOPT=false
end
end --return to preroll after win

end

function cherche_serie_de_win()
for x=1,NBRchance,1 do

if Tch[x]==nil then break end

if lastBet.roll < Tch[x] then


Tunder[x] = Tunder[x] +1
else
Tunder[x] =0
end

if lastBet.roll > (100-Tch[x]-0.01) then


Tover[x] = Tover[x] + 1
else
Tover[x] =0
end

if Tunder[x] >= Tover[x] then


TOUMX[x]=Tunder[x]
Tsens[x]=false
else
TOUMX[x]=Tover[x]
Tsens[x]=true
end
end
end

function cherche_serie_de_lose()
for x=1,NBRchance,1 do

if Tch[x]==nil then break end


if lastBet.roll < Tch[x] then
Tunder[x] =0
else
Tunder[x] = Tunder[x] + 1
end

if lastBet.roll > (100-Tch[x]-0.01) then


Tover[x] =0
else
Tover[x] = Tover[x] + 1
end

if Tunder[x] >= Tover[x] then


TOUMX[x]=Tunder[x]
Tsens[x]=false
else
TOUMX[x]=Tover[x]
Tsens[x]=true
end
end
end

function selection_indice_de_la_best_serie_win()
for x=1,NBRchance,1 do

if Tch[x]==nil then break end


if (1/(((Tch[x])/100)^TOUMX[x])) > bestchain then
bestchain=(1/(((Tch[x])/100)^TOUMX[x]))
indice=x
bestTOUMX=TOUMX[indice]
end
end
if bestTOUMX >= Tn[indice] and (lastBet.profit >= 0) then
MRTGLLOPT=true
bestchain=0 --to keep in memory even if the series is broken
chance=Tch[indice]
bethigh=Tsens[indice]
end
end

function selection_indice_de_la_best_serie_lose()
for x=1,NBRchance,1 do

if Tch[x]==nil then break end


if (1/(((100-Tch[x])/100)^TOUMX[x])) > bestchain then
bestchain=(1/(((100-Tch[x])/100)^TOUMX[x]))
indice=x
bestTOUMX=TOUMX[indice]
end
end
if bestTOUMX >= Tn[indice] and ((lastBet.profit >= 0) or chance==chancePRLL)
then
MRTGLLOPT=true
chance=Tch[indice]
bethigh=Tsens[indice]
end
end

function limiteSTOP(target,limite)
if balance > target then
simuInfo()
print("TARGET REACHED !!!!!!!!!!!!!!")
--stop()
elseif balance-nextbet < limite then
simuInfo()
print(".............................")
--stop()
end
end

bbDB = bb
startbank = balance
wagered = wagered + nextbet

function simuInfo()
-- print("#=========================================#")
-- print(" #---===--- Script name ---===---#
")
-- print("#=========================================#")
-- print("# [Starting bank = " ..string.format("%9.8f", startbank) .. " ]-")
-- print("# [Base bet = " ..string.format("%9.8f", bbDB) .. " ]-")
-- print("#=========================================#")
-- print("# [Chance: " ..string.format("%9.8f", chance) .. " ]-")
-- print("# [nextbet: " ..string.format("%9.8f", nextbet) .." ROLL n°
" ..bets .." ]-")
--
print("#---------------------------------------------------------------------------
-------#")
-- print("# [profit: " ..string.format("%9.8f", profit) .." (balance
x" ..string.format("%2.2f",((balance)/(startbank))) ..") ]-")
-- print("# [Max brought into play: " ..string.format("%9.8f", maxUse) ..
" ]-")
-- print("# [wagered: " ..string.format("%9.8f", wagered) .."
(" ..string.format("%2.2f",wagered/(startbank)) .." x start balance) ]-")
-- print("# [Avg profit/bet: " ..string.format("%9.8f", profit/bets/bbDB) .." x
base bet ]-")
-- print("# [Avg wag/bet: " ..string.format("%9.8f", wagered/bets) .." ]-")
-- print("# [PROFIT MAX= " ..bestID .." ]-")
-- print("# [PERTE MAX= " ..badID .." ]-")
-- print("#=========================================#\n\n\n")
end

perteP = 0
p = false
maxUse = 0
bestID,badID,pirePERTE,bestPROFIT=0,0,0,0
function calculPrint()
if p == true then
--print(balance)
-- print(chance)
-- print(nextbet)
-- print(coef)
end

perteP +=currentprofit
if perteP >= 0 then perteP = 0 end

if -perteP + nextbet > maxUse then maxUse = -perteP + nextbet end


if bets%frequence_affichage==0 then
simuInfo()
end

if currentprofit >= bestPROFIT then


bestID = lastBet.id
bestPROFIT = currentprofit
end

if currentprofit <= pirePERTE then


badID = lastBet.id
pirePERTE = currentprofit
end
end

chance=chancePRLL
nextbet=bbPRLL

debugg = false
bets = previousbet

--*******************************************************************
if (RiskLevel == 1) then
BaseBet = (balance / 1000)
end

if (RiskLevel == 2) then
BaseBet = (balance / 10000)
end

if (RiskLevel == 3) then
BaseBet = (balance / 100000)
end

function setStage(stageNumber)
print("\n\n#=========================================#")
print(" Switching to stage " .. stageNumber)
print("#=========================================#\n\n")
Stage = stageNumber
end

function setStage1()
setStage(1)

chance = 49.5
base = BaseBet
LoseStreak = math.random(2, 8) - 10
WinStreak = math.random(4, 8)
nextbet = base
previousBetClone = base
end

function setStage2()
setStage(2)

chance = chancePRLL
nextbet = bbPRLL
end

function printStats()
-- print("\n\n#=========================================#")
-- print(" STATS ")
-- print("#=========================================#")
-- print("# Stage: " .. Stage)
-- print("# Bets: " .. TB)
-- print("# Balance: " .. string.format("%9.8f", balance) .. " " ..
string.upper(currency))
-- print("# Profit: " .. string.format("%9.8f", profit) .. " " ..
string.upper(currency))
-- print("# Wagered: " .. string.format("%9.8f", TW) .. " " ..
string.upper(currency) .. " (" .. string.format("%2.2f", TW/initialbalance) .. "x
start balance)")
-- print("# Avg wag/bet: " .. string.format("%9.8f", TW/TB) .. " " ..
string.upper(currency))

if (Stage == 2) then
-- print("# Progress in Stage 2: " .. string.format("%3.2f",
((math.abs(profit) / Switch2Stage1) * 100)) .. "%")
end

-- print("#=========================================#\n\n")
end

function dobet()
bets = bets + 1

if (TB % printStatsEveryXBets == 0) then


printStats()
end

TW += previousBetClone -- adds previous bet to total wagered (TW) use print


(TW) in console to see total wagered
TB += 1 -- keeps a count of total bets print (TB) in console to see total
number of bets

if (profit >= ProfitTarget) then


print("\n\nStopped win - deposit 50% of balance to vault")
print(string.format("Total Wagered: %.8f", TW))
print(string.format("Total Bets: %d", TB))
--stop()
end

if (Stage == 2) then
if (debugg == true) then
if (bethigh == true) then
sens24 = "over" else sens24 = "under"
end
if (win) then
gain24 = " win"
else
gain24 = "lose"
end

-- print("================================")
-- print("=[Amount" .." ][ " .."sens" .." ][ " .."Chance" .." ]
[ " .."gain]=")
-- print("=[" ..string.format("%9.2f",previousbet) .." ]
[ " ..sens24 .." ][ "..string.format("%1.2f",chance).." ]
[ "..gain24 .." ]=")
-- print("================================")
end

pr = pr +currentprofit

cherche_serie_de_lose()
--cherche_serie_de_win()

bestchain=0
selection_indice_de_la_best_serie_lose()
--selection_indice_de_la_best_serie_win()

reset_to_preroll()

if MRTGLLOPT==true then
calcul_increase()
martingale_optimise()
end

calculPrint()
limiteSTOP(target,limite)

if (profit >= Switch2Stage1) then


setStage1()
return
end
end

if (Stage == 1) then
chance = 49.5
base = BaseBet
LoseStreak = math.random(2, 8)-10
WinStreak = math.random(4, 8)

if (profit <= Switch2Stage2) then


setStage2()

return
end

if (win) then
nextbet = previousBetClone * 2
else
nextbet = base
end

if (currentstreak >= 3) then


nextbet = base
end

if (currentstreak >= WinStreak) then


bethigh = !bethigh
end
if (currentstreak <= LoseStreak) then
bethigh = !bethigh
end
end

previousBetClone = nextbet
end

You might also like