Hello Guest

I need help for this script

  • 2 Replies
  • 240 Views
*

bit99

  • *
  • 3
  • +0/-0
    • View Profile
I need help for this script
« on: April 10, 2020, 02:28:52 pm »
the strategy is very simple. I play 100 bets with:   change =50   HI
                                                                               basebet=0.00000001

I win then the next 100 bets: change 50 LO                             but i lose the next 100 bets: change=50 Hi         
                                             basebet=0.00000001                                                                basebet=2*basebet     
                                                                               
that is to say,I win I start again but changing Hi for Lo,and ,I lose double the bet in HI like this until the balance is greater than at the beginning

this is te code but i don't know my mistake

chance   = 50
base     = 0.00000001
nextbet  = 0.00000001
balance2 = balance
bets     = 0
function dobet()

if bets==100 then
    if (balance) >= (balance2)  then
      bethigh = !bethigh
      nextbet = base
      chance  = 50
      bets    = 0
    else
      nextbet = base*2
      chance  = 50
      bets    = 0
    end
 else
  if win or !win then
      bets+=1
      nextbet = base
      chance  = 50
  end
end

*

Seuntjie

  • *****
  • 489
  • +13/-2
    • View Profile
Re: I need help for this script
« Reply #1 on: April 10, 2020, 03:50:12 pm »
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:

Quote
Code: [Select]
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?
« Last Edit: April 10, 2020, 03:53:50 pm by Seuntjie »

*

bit99

  • *
  • 3
  • +0/-0
    • View Profile
Re: I need help for this script
« Reply #2 on: April 10, 2020, 04:41:14 pm »
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:

Quote
Code: [Select]
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:

Quote
Code: [Select]
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