Hello Guest

trying a script that changes multiplier 5 times and chance 5 times depending...

  • 1 Replies
  • 269 Views
*

assword

  • *
  • 4
  • +0/-0
    • View Profile
Hi,
I'm trying to write a script for a strategy I can't do just using Advanced tab.
What I'm trying to accomplish:
I want to gradually increase betting chance and betting multiplier depending on how many losses I've accumulated before hitting a pre-determined winning streak. My bet is that I'll reach a max of 5 wins in a row (depends on chance at the time) before a max of 15 total losses.

First three losses without one win depend on Multiplier(A) and Chance(A)
Next three losses without two wins in row depends on Multiplier(B) and Chance(B)
Next three losses without three wins in row depends on Multiplier(C) and Chance(C)
Next three losses without four wins in row depends on Multiplier(D) and Chance(D)
Next three losses without five wins in row depends on Multiplier(E) and Chance(E)
Reset or stop if 15 losses happen before 5 wins in a row.

Here's my code:
Code: [Select]
chance=79.2
chanceb=82.5
chancec=86.08
chanced=90
chancee=94.28
baseBet=0.00000004
multipleA=6
multipleB=3.3334
multipleC=2.5
multipleD=2.2
multipleE=2

bethigh=true

function dobet()

if win then

nextbet=baseBet

else

nextbet=previousbet*multipleA

end if currentstreak==1 then

nextbet=baseBet

else

if losses==-1 then

nextbet=previousbet*multipleA

end if currentstreak==1 then

nextbet=baseBet

else

if losses==-2 then

nextbet=previousbet*multipleA

end if currentstreak==1 then

nextbet=baseBet

else

if losses==-3 then

chance=chanceb
nextbet=previousbet*multipleB

end if currentstreak==2 then

nextbet=baseBet

else

if losses==-4 then

nextbet=previousbet*multipleB

end if currentstreak==2 then

nextbet=baseBet

else

if losses==-5 then

nextbet=previousbet*multipleB

end if currentstreak==2 then

nextbet=baseBet

else

if losses==-6 then
chance=chancec
nextbet=previousbet*multipleC

end if currentstreak==3 then

nextbet=baseBet

else

if losses==-7 then

nextbet=previousbet*multipleC

end if currentstreak==3 then

nextbet=baseBet

else

if losses==-8 then

nextbet=previousbet*multipleC

end if currentstreak==3 then

nextbet=baseBet

else

if losses==-9 then

chance=chanced
nextbet=previousbet*multipleD

end if currentstreak==4 then

nextbet=baseBet

else

if losses==-10 then

nextbet=previousbet*multipleD

end if currentstreak==4 then

nextbet=baseBet

else

if losses==-11 then

nextbet=previousbet*multipleD

end if currentstreak==4 then

nextbet=baseBet

else

if losses==-12 then

chance=chancee
nextbet=previousbet*multipleE

end if currentstreak==5 then

nextbet=baseBet

else

if losses==-13 then

nextbet=previousbet*multipleE

end if currentstreak==5 then

nextbet=baseBet

else

if losses==-14 then

nextbet=previousbet*multipleE

end if currentstreak==5 then

nextbet=baseBet

else

if losses==-15 then

nextbet=previousbet*multipleE

end if currentstreak==5 then

nextbet=baseBet

end

end

Here's a spreadsheet version of the strategy if my words are confusing.
link: https://pasteboard.co/JKoPlWf.jpg

This is my first script and I'm pretty basic in my coding skills :)

Are there variables I'm missing?
Is there a way to test this (simulate)?
Am I using the variables right and at the right time?

Thanks in advance for any advice :)
Ciao

*

Seuntjie

  • *****
  • 581
  • +15/-3
    • View Profile
Haven't looked at your actual code, though based on your questions and comments, this is probably worth posting:

See the programmer mode tutorials on https://forum.seuntjie.com/index.php?topic=2.0.

"Is there a way to test this (simulate)?". Yes, use the simulator (view->simulate / runsim(balance,numberofbets)