# Thread: need help with percentages

1. ## need help with percentages

Hello

I am creating a software to automaticaly place bets on a betting exhange...

The software keeps track of the current loss and is supposed to adjust it to take account for the 5% commission charge taken from any winnings.

My first thought on how to do this was to add 5% to each loss before adding it to the total but this doesn't work.

I need to know how to adjust the loss to an ammount which equals the actual loss when it has 5% deducted from it.

Hope somone can help.

2. If the 5% commission is taken from any winnings, then why do you wish to add it to losses? Also, why are you deducting 5% from losses?

If I understand you correctly, it seems the logic should be:

1. Place bet of amount X. Subtract bet amount from "pocket," i.e., your total.
2. If the bet loses, do nothing. The total, having already been reduced, stays the same.
3. If the bet wins, add X (your original bet) back to the total, then add .95X (95% of the winnings) to the total.

Repeat steps 1-3.

Patrick

3. Hi Patrick

I think I didn't do a very good job of explaining my problem, the process is supposed to be like this
1. place a bet (for these kind of bets the returned ammount always equals the stake)
2. If the bet loses add this ammount to the total loss.
OR
If the bet wins subtract that ammount from the total loss.
3. Place the next bet to cover the total loss even with a 5% commsion charge.

4. Sorry for my confusion, but your method seems backwards to me.

But the next bet is going to have a base value of N, plus 5% of the last value .05X. So it will be N + .05X. If the base value is the same every bet, then N = X and it is just X + .05X which is X(1 + .05) or 1.05X.

I'm sorry if I'm still not understanding.

Patrick

5. Originally Posted by PatrickFoster
But the next bet is going to have a base value of N, plus 5% of the last value .05X. So it will be N + .05X. If the base value is the same every bet, then N = X and it is just X + .05X which is X(1 + .05) or 1.05X.
This is what I originally tried but it didn't work.

Here is an example

I place a £10 bet that losses.
Nex bet is £10 *1.05 = £10.50
Next bet wins, £10.50 - (10.5 *0.05) = £9.975 (win - 5%)

6. Ok, I just do not get what you want it to do (and why).

I place a £10 bet that losses.
Nex bet is £10 *1.05 = £10.50
Next bet wins, £10.50 - (10.5 *0.05) = £9.975 (win - 5%)

1. Bet of 10 loses. Total loss = 10
2. Bet of 10.50 is the next bet. (Why add 5% here? The commission is only for winning bets, correct?)
3. Bet of 10.50 wins, Total Loss = 10 - (10.50 minus 5%)

So I just don't get the point of what your are doing. However, I can guess at this. Are you trying to bet so that if you win on any given bet, then your total losses are completely covered by the win, so that you then become even?

1. Bet 10 and lose. Total loss = 10.
2. Next bet: to cover the Total loss (10), you must have some value x where x - .05x = 10. This is 10/0.95, or roughly 10.53.
3. If the previous bet wins, your total loss is = 0 (give or take a cent). But if the previous bet loses, your total loss is now 10 + 10.53 = 20.53.
4. Third bet: to cover the Total loss (20.53), you must do the same as in step 2, where it is (Total Loss)/.95. The third bet would be 21.61. If you win this bet, the 5% commission is 1.08, leaving 21.61 - 1.08 = 20.53 to cover the total loss.

So that's how you do that. But what if the total loss is less than or equal to zero? The bet will of course be determined by some other formula, i.e., whatever it is you wish to bet.

Does that help?

Patrick

7. Thak you, thats what I wanted to do.

2. Bet of 10.50 is the next bet. (Why add 5% here? The commission is only for winning bets, correct?)
This was my mistake, I had thought that adding the 5% to the loss would have represented how much a bet was needed.