Looking for some help to clean up my code since it's not working like I want it to. What I'm trying to write is a basic martingale bot for a 1.5x method that doubles on loss, but then repeats the last bet after a win.
Example of what I'm trying to accomplish here.chance = 65
enablesrc=true
percentage=0.01
multiplier=2
base = balance*(percentage/100)
basebet = balance*(percentage/100)
nextbet = base
bethigh = false
function dobet()
if win then
nextbet = previousbet
if win then
nextbet = basebet
else
nextbet = previousbet*multiplier
end
else
nextbet = previousbet*multiplier
end
end
The double on loss works fine, but it keeps resetting to the base bet after the first win. Why is the "nextbet=previousbet" part not functioning like I want it to?
Also, setting my base bet as a percentage of my balance only does so at the start of running the script. It doesn't refresh after every cycle like I want it to. Any ideas if there's a fix for this too?