Intermediate refreshes

Please post any questions regarding the program here.

Moderator: 2020vision

Intermediate refreshes

Postby Roger » Thu Aug 07, 2008 9:37 am

Assuming one BA access on the price-logging sheet, and refreshes at one per second, there is one "full" refresh every second, with the full 16-column data load. But there are also several intermediate refreshes, of less than 16 columns. What are these, please? Is there useful data I should capture in them?

Looking for bet references, will these always be in the full refresh data?
Roger
 
Posts: 140
Joined: Fri Nov 18, 2005 10:45 pm

Postby GaryRussell » Thu Aug 07, 2008 2:36 pm

On each refresh the following data is copied to Excel in 3 operations generating 3 worksheet change events.

The following assumes the origin cell is A1 and there are 6 runners. On each 1 second refresh the following occurs.

1) The trigger column headings are populated: Trigger,Odds,Stake,Bet ref,Bet time,Avg matched odds,Avg matched stake and Profit/Loss. This is range Q4:X4

2) The main prices data is populated. This is range A1:P10 (16 columns and 10 rows)

3) bet ref, bet time, matched odds, matched stake, profit and loss are updated. This is range T5:X10

If a bet has been triggered then there will be 4th update to populate the bet ref, bet time, Avg matched odds and Avg matched stake which is range T5:W10. You could check for Target.Columns.Count = 4 to pick up the bet refs as soon as they are populated. If for some reason there was an error copying the data to Excel in this operation then the bet refs would be populated on the next refresh before anything else which is range T5:T10 so you should also check for this update. Alternatively you could just check for update 3 above if you don't mind waiting until the next refresh to get the bet refs.
User avatar
GaryRussell
Site Admin
 
Posts: 9871
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby Roger » Thu Aug 07, 2008 3:09 pm

Thanks very much Gary. I was finding it very difficult to see what came when once it was all happening on live races.
Roger
 
Posts: 140
Joined: Fri Nov 18, 2005 10:45 pm

Postby alrodopial » Thu Aug 07, 2008 3:10 pm

At what point of the above proccedur BA gets the new refresh rate from Q2?
I assume before everything else because although the formula in q2 gives me a new refresh rate (based on the new odds data) BA gets this new refresh rate at the next update and not the current update.
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Postby GaryRussell » Thu Aug 07, 2008 3:21 pm

Between update 1 and 2 cell Q2 is read and the refresh rate in BA is updated. As it's only checked on each refresh then if your refresh rate is 10 seconds for example and there was a refresh 2 seconds before you change the cell then it will be another 8 seconds before this is picked up.
User avatar
GaryRussell
Site Admin
 
Posts: 9871
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby PeteB » Thu Aug 07, 2008 4:48 pm

Ha that's good timing - I am just doing a bunch of testing in debug to make sure I've got how the refreshes work - I hadn't realised there was a 4th update after placing a bet - presumably if I am on a slow refresh, this 4th update will still get sent as soon as BA has a bet reference, rather than waiting for the next refresh?? Will test this now!

Thanks Gary
PeteB
 
Posts: 258
Joined: Tue May 23, 2006 12:13 pm

Postby GaryRussell » Thu Aug 07, 2008 4:53 pm

Yes, the 4th update is sent before the next refresh.
User avatar
GaryRussell
Site Admin
 
Posts: 9871
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby PeteB » Thu Aug 07, 2008 4:56 pm

Oh meant to say, it's better to test where the change has occurred rather than just its number of columns alone, or you could end up processing more often than you need to.

So for the main price updates I test for:
Code: Select all
if ((target.Column == 1) && (target.row ==1) && (target.Columns.Count == 16))


And to pick up the 4th update it will presumably be
Code: Select all
if ((target.Column == 20) && (target.row ==5) && (target.Columns.Count == 4))
PeteB
 
Posts: 258
Joined: Tue May 23, 2006 12:13 pm

Postby PeteB » Thu Aug 07, 2008 4:56 pm

Great - thanks Gary - that will help a lot!
PeteB
 
Posts: 258
Joined: Tue May 23, 2006 12:13 pm

Postby PeteB » Thu Aug 07, 2008 5:19 pm

That's great - I can pick up that refresh - exactly what I need!

(it doesn't seem to send one on a cancel - it just zeroes out the details on the normal T5:X10 refresh - though I haven't tried cancelling a partial match yet - will have to check that this evening)
PeteB
 
Posts: 258
Joined: Tue May 23, 2006 12:13 pm

Postby PeteB » Thu Aug 07, 2008 11:03 pm

Finally got a chance to finish testing it...

Ok so to test whether a bet has been received by BA:
- check the T5:Xn refresh - if it has gone to PENDING then BA has the bet
- check the T5:Wn refresh to pick up the bet reference

And to check whether a Cancel has been received by BA:
- check the T5:Xn refresh - if the bet ref has been removed, then BA has the Cancel request

And of course check MyBets to ensure spreadsheet records of bets are consistent with BA records - pleased to see that MyBets is updated before the A1:Pn refresh.

Incidentally, when are the triggers taken from Excel?? Presumably it is before the A1:Pn refresh?
PeteB
 
Posts: 258
Joined: Tue May 23, 2006 12:13 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 29 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.