|
-
Aug 17th, 2005, 05:55 AM
#1
PowerPoster
Re: I Failed Maths
Hi,
I may be dumb about this but I need more information!
Are all the horses in the same race so that you want to back all the horses and come out winning?
Are the horses in separate races and you are relying on picking the winner in each race?
Are you making the book on a race and want to make sure you make a profit whichever horse wins?
I don't understand your "Odds" column. In the UK we would show odds as:
7 to 1 against (bet 1 to win 7 + your stake return)
7 to 1 on (bet 7 to win 1 + your stake return)
Evens ( bet any amount to win the same amount + your stake return)
Also, you do not show how much you have bet on each horse.
(You had better hurry up or the race will be over )
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Aug 17th, 2005, 06:41 AM
#2
Thread Starter
New Member
Re: I Failed Maths
(You had better hurry up or the race will be over  )
Nice one, made me smile!
Taxes,
No, you are not dumb, I just have trouble making my self clear. Forgive me if this is too long but I will try to give as much information as possible.
Firstly the odds are decimalised and net of the stake. In my example 7.0 should actually be 8.0 which equates to 7 to 1.
The horses are all in the same race and I want to make a profit regardless of which horse wins (or conversely minimise my losses regardless of which horse wins). So yes I would like to make a "book".
The amount bet so far on each horse is implied by the profit column. I don't know the individual bets just the cumulative outcome of all bets, which are shown in the profit column.
I appreciate your reply. If you need any more information I will post a reply as soon as I am able.
Even if you can't solve it, I would appreciate any help or advice of where on the web to look and under what topic to look.
Many thanks,
Scott
-
Aug 17th, 2005, 04:10 PM
#3
PowerPoster
Re: I Failed Maths
Hi,
From what you now say I assume you are making a book on the race. i.e. you are acting as though you are accepting bets on the race.
Consider this. First you need to work out how much minimum profit you want to make. You need to work out the amount you stand to lose on each horse if it wins. Then You need to work out how much you win on each horse if it loses. You can then adjust the odds to reflect the profit you want. To do that you have to keep a running record of the amount of bets placed at what odds.. You will have to keep a record of each bet anyway, so use a two dimension array to keep the values: something like arrBets(100,4)
Each line represented by the first dimension will contain all the required information on one ber. The second dimension elements will contain:
arrBets(0,0) Contains the Horse ID
arrBets(0,1) ,, Punter ID
arrBets(0,2) ,, Amount of the bet
arrBets(0,3) ,, Odds applicable
arrBets(0,4) ,, Amount to be paid out (Winnings + Stake)
You can then use that array to calculate the amounts you require to know.
e.g.
In arrHorse(8,1) (Assumes 9 horses with ID's from 0 to 8
arrHorse(0,0) Contains the total bet on the horse
arrHorse(0,1) Contains the total to be paid out if the horse wins
arrHorse(0,2) Contains the latest odds
Dim iCount As Integer
For iCount = 0 to 100
arrHorse(arrBets(iCount,0),0) +=arrBets(iCount,2)
arrHorse(arrBets(iCount,0),1) +=arrBets(iCount,4)
iTotalBets +=arrBets(iCount,2)
Next iCount
For iCount = 0 to 8
iNetProfit=iTotalBets-arrHorse(0,1)-arrHorse(0,1)
MessageBox.Show("Net Profit if winner is Horse No. " & iCount.ToString & " is " & iNetProfit.ToString
Next iCount
See if you can progress from there. 
Come to think of it, it would be easier to do this using Excel, assuming you are conversant with automation. You can do this from within VB.NET.
OOPS!! I see you are using VB4. I'm afraid I can't be any help with that.
Last edited by taxes; Aug 17th, 2005 at 06:00 PM.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|