Have you had a look at the tutorials on https://forum.seuntjie.com/index.php?topic=2.0? Specifically the steemit tutorials? They are more aimed at beginners and there're posts explaining the different varaibles, what they and examples of how some of them can be used.
I'm not going to fix any of your code but I'll point out a few things that might help you fix it yourself.
the bets variable is incremented by 1 after every bet, so doing "if bets==100 then" will trigger only once after exactly 100 bets. Never before, never after. If you want something to happen every 100 bets, see https://forum.seuntjie.com/index.php?topic=2.msg2086#msg2086.
what does "I win then the next 100 bets:" and " but i lose the next 100 bets" mean exactly? Win the 100th bet? win more bets than you lose in those 100? have profit after 100 bets? break those complex statements down into as small pieces as you possibly can, and that's the code you need to write.
Edit: Just saw that last bit of code you have:
if win or !win then
bets+=1
nextbet = base
chance = 50
end
Win is either true or false. You either win the bet or you lose the bet. You're asking, if this bet was a win, OR if this bet was a loss, then do something, and since a bet is always one of those two, it will always pass the condition. I'm trying to say the if part of that code is unnecessary because if the result is always true, why ask the question?
I'm not going to fix any of your code but I'll point out a few things that might help you fix it yourself.
the bets variable is incremented by 1 after every bet, so doing "if bets==100 then" will trigger only once after exactly 100 bets. Never before, never after. If you want something to happen every 100 bets, see
https://forum.seuntjie.com/index.php?topic=2.msg2086#msg2086.
what does "I win then the next 100 bets:" and " but i lose the next 100 bets" mean exactly? Win the 100th bet? win more bets than you lose in those 100? have profit after 100 bets? break those complex statements down into as small pieces as you possibly can, and that's the code you need to write.
Edit: Just saw that last bit of code you have:
if win or !win then
bets+=1
nextbet = base
chance = 50
end
Win is either true or false. You either win the bet or you lose the bet. You're asking, if this bet was a win, OR if this bet was a loss, then do something, and since a bet is always one of those two, it will always pass the condition. I'm trying to say the if part of that code is unnecessary because if the result is always true, why ask the question?
[/quote]
First of all thanks for the help.
The algorithm I am trying to do is:
for example: chance 50% Hi and I play 100 bets if the profit is positive in those 100 bets I start again but now chance 50% Lo and I play 100 bets, if the profit is positive I start again chance 50% Hi, that is the routine if in those 100 bets the profit is positive.
But if the profit is negative, for example
I play 100 bets with chance 50% Hi and negative profit, so the next 100 bets are chance 50% Hi but doubling the bet so on until I get a positive profit.
It is a variant of the martingale method but in 100 consecutive bets