Horse Racing Forum - PaceAdvantage.Com - Horse Racing Message Board

Go Back   Horse Racing Forum - PaceAdvantage.Com - Horse Racing Message Board > Thoroughbred Horse Racing Discussion > Handicapping Software


Reply
 
Thread Tools Rate Thread
Old 07-27-2004, 10:58 PM   #1
nucsub
Registered User
 
Join Date: Mar 2002
Location: pennsville, New Jersey
Posts: 43
Real-Time Tote Board monitoring

I have had some interest by customers for a tote board program that monitors in "real-time" the changes in the odds as you get closer to post time. Has anyone tackled this type of program? Anyone offering comments, suggestions would be appreciated.
I am thinking about an add-on to my existing handicapping programs.

thanks

Joe Zambuto
www.BeatThePublic.com
nucsub is offline   Reply With Quote Reply
Old 07-27-2004, 11:06 PM   #2
andicap
Registered User
 
andicap's Avatar
 
Join Date: Mar 2001
Location: White Plains, NY
Posts: 5,315
see "Attheracespro," an excellent program in this regard.

http://www.homebased2.com/atr/atrpro_dnl.htm

download 30-day demo, there's a manual too. Can bet into Pinnacle from the software and store all the odds changes on your hard drive for later analysis.

only $25.(I am NOT associated with the program in any way. I demo'd it recently and liked it, but haven't gotten around to buying it, which I will when I open a Pinnacle account.)
__________________
andicap
andicap is offline   Reply With Quote Reply
Old 07-28-2004, 11:11 AM   #3
lefthandlow
Registered User
 
Join Date: Dec 2002
Location: Ma
Posts: 206
andicap question???

andicap
you said that program was 25.00 .at the site it says 99.00

a year Am I looking at the wrong program??LL
lefthandlow is offline   Reply With Quote Reply
Old 07-28-2004, 12:04 PM   #4
BillW
Comfortably Numb
 
BillW's Avatar
 
Join Date: Sep 2001
Location: Lexington, Ky
Posts: 6,174
Re: Real-Time Tote Board monitoring

Quote:
Originally posted by nucsub
I have had some interest by customers for a tote board program that monitors in "real-time" the changes in the odds as you get closer to post time. Has anyone tackled this type of program? Anyone offering comments, suggestions would be appreciated.
I am thinking about an add-on to my existing handicapping programs.

thanks

Joe Zambuto
www.BeatThePublic.com
I haven't got to it yet, but my initial thought is to avoid elegance and just read the URL and parse it out. As a matter of fact I'd have to think awhile to come up with plan II.

Bill
BillW is offline   Reply With Quote Reply
Old 07-28-2004, 04:59 PM   #5
Jeff P
Registered User
 
Jeff P's Avatar
 
Join Date: Dec 2001
Location: JCapper Platinum: Kind of like Deep Blue... but for horses.
Posts: 5,287
Originally posted by Joe Zambuto-

I have had some interest by customers for a tote board program that monitors in "real-time" the changes in the odds as you get closer to post time. Has anyone tackled this type of program? Anyone offering comments, suggestions would be appreciated.


Joe,

A couple of weeks ago I wrote my own Scratch Bot- a program that parses Bris Supertote HTML. It continually looks for scratches and races taken off the turf. When it finds a change that my main program hasn't processed yet, it processes the change and then throws a message box up on the screen telling me that X horse at X track has been scratched from race X or that races X,Y, and Z have been taken off the turf at track W.

It identifies scratches two ways.

First, when the odds field found in the Bris Supertote HTML is "----" instead of a numeric value, then I know that the horse (or both halves of an entry if there was an entry) have been scratched.

The second way is parsing the pages Bris specifically uses to display scratches.

Now I realize that my program was written specifically to identify scratches and races taken off the turf, but parsing tote board html is still parsing toteboard html, no matter why you happen to be doing it.

I used VB Com to write my program. I found parsing out Supertote HTML to be a trickier task than what I first imagined. This next part is likely to cause anyone not familiar with VB programming to become a little lost, but here are some "gotchas" I discovered along the way.

First, there was the issue of track codes.

Core logic already in place knew what data files were loaded into my main program and referred to them by the first three characters of the Bris data file. So for Del Mar, the track code would be "DMR." But Bris Supertote uses its own unique set of track codes and yes they are different than the track codes Bris uses for its own data files. The url for Del Mar on Supertote has a track code of "DEL." This also happens to be the same file based track code for Delaware Park (DEL.) Having two sets of track codes is enough to confuse the hell out of just about anyone, including me. So what I ended up having to do was create a separate table with fields for FileTrackCode, URLTrackCode, and Notes (where I could spell out the full name of the track) just to store my track codes. I then had to create logic to pull needed supertote track codes out of the table and store them in an array inside the Form_Load() event procedure.

Getting a VB WebBrowser control to fire a DocumentComplete() event procedure each time a new url has been loaded was far trickier than I thought it would be. My main program might have 7 or 8 data files loaded into it at any one time. So I created an array containing urls for all currently loaded track codes and just iterated through the list of urls, navigating to each one in succession. Trouble was, often, the navigation to the next url would want to begin before the current url had fired the DocumentComplete() event whre the html was being parsed. I spent a lot of unexpected time putting in assertions and traps to prevent this from happening. I also discovered that the DocumentComplete() event fires much faster in a VB project if you set focus on some other control, like a textbox or button, in the project immediately after the statement causing the navigation event to execute.

For anyone who tries to tackle something like this on your own, perhaps reading about the gotchas that caused me extra time and effort will reduce your own time and effort somewhat.

By the way, if you are looking for somebody to create a program that monitors in "real-time" the changes in the odds as you get closer to post time, this is definitely something that I can do. I can't help but think of the work I've done so far as a pretty good starting point.
__________________
Team JCapper: 2011 PAIHL Regular Season ROI Leader after 15 weeks
www.JCapper.com
Jeff P is offline   Reply With Quote Reply
Old 07-28-2004, 11:58 PM   #6
andicap
Registered User
 
andicap's Avatar
 
Join Date: Mar 2001
Location: White Plains, NY
Posts: 5,315
Re: andicap question???

Quote:
Originally posted by lefthandlow
andicap
you said that program was 25.00 .at the site it says 99.00

a year Am I looking at the wrong program??LL

You're right. The $25 is for a second license -- e.g. a laptop if the first one is on a PC.

:o
__________________
andicap
andicap is offline   Reply With Quote Reply
Old 07-29-2004, 07:07 AM   #7
lefthandlow
Registered User
 
Join Date: Dec 2002
Location: Ma
Posts: 206
andicap

thanks for the explanation.LL
lefthandlow is offline   Reply With Quote Reply
Old 08-02-2004, 09:17 PM   #8
DJofSD
Screw PC
 
Join Date: Jun 2003
Posts: 15,728
Jeff P

Congrats on the VB web bots.

Being the middle of a couple of those projects myself, I can appreciate the "issues" you outlined.

BTW, I have a germ of an idea. See the "Smart" money thread in the General Handicapping section.

DJofSD
DJofSD is offline   Reply With Quote Reply
Old 08-03-2004, 04:05 AM   #9
formula_2002
what an easy game.
 
formula_2002's Avatar
 
Join Date: Dec 2002
Posts: 43,096
Jeff, I have written two programs for the Bris super tote.
One is for win betting the other is win pool / exacta pool analysis.

The scratch horse was an interesting item to overcome. The html “index” number changes for all program numbers greater then the scratched horse’s program number.

Joe M
__________________
Peace on earth, good will to all
GOD BLESS AMERICA

" I pass with relief from the tossing sea of cause and theory to the firm ground of result and fact"
Winston Churchill
formula_2002 is offline   Reply With Quote Reply
Old 08-03-2004, 07:35 AM   #10
lefthandlow
Registered User
 
Join Date: Dec 2002
Location: Ma
Posts: 206
program

does your program need anything special on my computer to

run it correctly.I still use win98 will that work??cheers LL
lefthandlow is offline   Reply With Quote Reply
Old 08-03-2004, 05:00 PM   #11
Jeff P
Registered User
 
Jeff P's Avatar
 
Join Date: Dec 2001
Location: JCapper Platinum: Kind of like Deep Blue... but for horses.
Posts: 5,287
Lefthandlow,

If you're referring to my Scratch Bot, it's not a stand alone. At least not yet.

Currently, it requires three things.

1. Identical drive and folder names/structure to what I have.
1. A copy of my main program sitting in the correct folder.
2. A copy of my SQL database sitting in the correct folder.

From a psuedocode standpoint, here's how the scratch bot works with my main program.

First, my main program has a file load module that finds and loads all race cards for a given date. When race cards (bris data
files) are loaded a routine in the loader writes the bris track code for each loaded file to the database. This same routine that loads race cards also creates a separate live runners file that contains the date, race number, post position, and name of each live runner found in the bris data file. A separate file, blank at first, is also created for scratched horses which will be added later, as they are found. A third file is also created. It contains race header information: Date, track, race number, distance, surface, and a true/false to indicate changes for each race. This file is used for changes such as races taken off the turf.

Scratch Bot is launched from a menu found on my main program. The first thing it does is build its list of urls. It gets these by
first looking at the loaded race cards (bris data file track codes created by the file loader) and then it goes to a
trackabbreviations table in the database to get the supertote track code for each loaded race card.

Next a navigation event is performed for the first url. When the url is loaded a documentComplete() event fires and parsing of the
innerHTML for that url commences. If parsing finds any scratched horses present in the innerHTML from the url being parsed, the race number, post postion, and horse name (when available) of the potential scratch are passed to an addNewScratch() function where that function's logic then does a couple of preliminary checks.

First, it checks the live runners file for the presence of the scratched horse.

As an aside, because of races for mules, appaloosas, arabians, and sometimes quarter horses, which may or may not make it into the bris data files that I use, but do make it onto the bris supertote pages that I check for scratches, I discovered that it is
entirely possible to find a scratched horse on a supertote page that I don't even have as a live runner for the day. Hence, the
reason for checking the live runners file.

If the horse is found in the live runners file, the scratches file is then checked. If the horse exists in the live runners file but not the scratches file- Viola! That's what I was after. An unprocessed scratch has just been found. The horse is then added to the
scratches file. A byte indicating fresh scratches is sent to my main program. My main program then processes the scratch and throws a message box up on the screen telling me that X horse in X race at X track has just been scratched. Very similar logic is used to process races taken off the turf as well. After the innerHTML for the current url has been completely parsed, navigation to the next url on the list commences. After the last url on the list has been parsed, navigation commences for the first url on the list. This process is continually repeated, until the user closes the scratch bot.

From this explanation, I hope you can see that it would take some further work to make this project into a stand alone. If that were to happen, I could see Scratch Bot throwing up a message box on the screen advising the user about scratches, races taken off the turf, and jockey changes. I could also see it writing scratches/changes to a database or even a simple text file in such a way that other programs could use this as an open source for processing their own scratches internally.

I dunno. Is there any real interest out there?

So far I've tested all my stuff successfully on Win 98, NT4.0, Win 2k, XP Home, and XP Pro. I wonder if there's anybody out there still using Win 95 or (shudder) Win 3.X?
__________________
Team JCapper: 2011 PAIHL Regular Season ROI Leader after 15 weeks
www.JCapper.com
Jeff P is offline   Reply With Quote Reply
Old 08-03-2004, 05:05 PM   #12
Jeff P
Registered User
 
Jeff P's Avatar
 
Join Date: Dec 2001
Location: JCapper Platinum: Kind of like Deep Blue... but for horses.
Posts: 5,287
DJofSD,

Read your Smart Money post with more than a little bit of interest. It wouldn't be all that hard from here to create table structure for capturing tote information, and then create of special version of Scratch Bot (Tote Bot?) to capture real time tote information and write it to a database.

Certainly a vaery doable thing.
__________________
Team JCapper: 2011 PAIHL Regular Season ROI Leader after 15 weeks
www.JCapper.com
Jeff P is offline   Reply With Quote Reply
Old 08-03-2004, 05:32 PM   #13
Jeff P
Registered User
 
Jeff P's Avatar
 
Join Date: Dec 2001
Location: JCapper Platinum: Kind of like Deep Blue... but for horses.
Posts: 5,287
Joe M,

I'm not using html “index” numbers at all. Not to say that you can't do it that way. You can, and it will work. But I decided to do it in a way that I was already pretty familiar with.

What I'm doing, and it's VB code (should also work as VBA code inside of both Access or Excel) is something like this:

First, I add a webBrowser control to my VB Project. Then, inside the documentComplete() event procedure, which allegedly fires every time a url has finished loading I have some code like this:

'declare local variables
Dim objDoc As Object
Dim strPageHTML As String
Dim strHTMLSegment As String
Dim strFind As String
Dim strTrackName As String
Dim intCurrLoc As Integer


'get the page html
Set objDoc = WebBrowser1.Document
strPageHTML = objDoc.body.innerHTML

Now, after that bit of code executes, the variable strPageHTML holds what I call the innerHTML content of the page as a String.

Then I simply locate needed bits and pieces of the string content, mainly using the VB Instr function to find what I'm after.

For Example, to get the Track Name from a supertote odds page:

'Parse Page HTML

'get the track name
intCurrLoc = InStr(1, strPageHTML, "target=botFrame><B>")

If intCurrLoc = 0 Then
'current location not found
Exit Sub
End If

strHTMLSegment = Left(strPageHTML, intCurrLoc - 1)
strHTMLSegment = Replace(strPageHTML, strHTMLSegment, "")

strFind = "target=botFrame><B>"
strHTMLSegment Replace(strHTMLSegment, strFind, "")

intCurrLoc = InStr(1, strHTMLSegment, "</B>")
strTrackName = Left(strHTMLSegment, intCurrLoc - 1)


At this point the variable strTrackName now holds the name of the track.

...and on down through the page until I've pulled everything I was after.

So, in reality, I'm not parsing indexes. I'm pulling out specific track and horse names, race numbers, post positions, odds, races taken off the turf, specific jockey changes, etc.
__________________
Team JCapper: 2011 PAIHL Regular Season ROI Leader after 15 weeks
www.JCapper.com
Jeff P is offline   Reply With Quote Reply
Old 08-07-2004, 04:21 AM   #14
rrbauer
Both-hands Bettor
 
Join Date: Mar 2002
Location: NASCAR Country
Posts: 4,390
When the tote information available to us becomes "real time" then betting-pool analysis vis-a-vis some probability models for a race outcome, could be useful.

With the delays inherent in today's tote network, be they 45-second, or 90-second; and, with something like half of the totals for the final pools being bet in the last two minutes; developing an effective "end game" strategy for plays based on tote information is unlikely.
__________________
Richard Bauer
rrbauer is offline   Reply With Quote Reply
Old 11-13-2021, 01:02 AM   #15
formula_2002
what an easy game.
 
formula_2002's Avatar
 
Join Date: Dec 2002
Posts: 43,096
Quote:
Originally Posted by Jeff P View Post
Joe M,

I'm not using html “index” numbers at all. Not to say that you can't do it that way. You can, and it will work. But I decided to do it in a way that I was already pretty familiar with.

What I'm doing, and it's VB code (should also work as VBA code inside of both Access or Excel) is something like this:

First, I add a webBrowser control to my VB Project. Then, inside the documentComplete() event procedure, which allegedly fires every time a url has finished loading I have some code like this:

'declare local variables
Dim objDoc As Object
Dim strPageHTML As String
Dim strHTMLSegment As String
Dim strFind As String
Dim strTrackName As String
Dim intCurrLoc As Integer


'get the page html
Set objDoc = WebBrowser1.Document
strPageHTML = objDoc.body.innerHTML

Now, after that bit of code executes, the variable strPageHTML holds what I call the innerHTML content of the page as a String.

Then I simply locate needed bits and pieces of the string content, mainly using the VB Instr function to find what I'm after.

For Example, to get the Track Name from a supertote odds page:

'Parse Page HTML

'get the track name
intCurrLoc = InStr(1, strPageHTML, "target=botFrame><B>")

If intCurrLoc = 0 Then
'current location not found
Exit Sub
End If

strHTMLSegment = Left(strPageHTML, intCurrLoc - 1)
strHTMLSegment = Replace(strPageHTML, strHTMLSegment, "")

strFind = "target=botFrame><B>"
strHTMLSegment Replace(strHTMLSegment, strFind, "")

intCurrLoc = InStr(1, strHTMLSegment, "</B>")
strTrackName = Left(strHTMLSegment, intCurrLoc - 1)


At this point the variable strTrackName now holds the name of the track.

...and on down through the page until I've pulled everything I was after.

So, in reality, I'm not parsing indexes. I'm pulling out specific track and horse names, race numbers, post positions, odds, races taken off the turf, specific jockey changes, etc.
It's a wonder how many years we have been going this
__________________
Peace on earth, good will to all
GOD BLESS AMERICA

" I pass with relief from the tossing sea of cause and theory to the firm ground of result and fact"
Winston Churchill

Last edited by formula_2002; 11-13-2021 at 01:03 AM.
formula_2002 is offline   Reply With Quote Reply
Reply





Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

» Advertisement
» Current Polls
Wh deserves to be the favorite? (last 4 figures)
Powered by vBadvanced CMPS v3.2.3

All times are GMT -4. The time now is 05:07 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 1999 - 2023 -- PaceAdvantage.Com -- All Rights Reserved
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program
designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.