how does excel get updated by BA

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

how does excel get updated by BA

Postby bolpx001 » Tue Dec 05, 2017 5:14 pm

Hi All just wondering how exactly bets are placed using excel and BA. Example if BA updates Excel at 1:15:00.2 and I immediately (vba macro) fill in the Q5 R5 and S5 does the bet get sent immediately to Betfair or wait until the next price change update by Betfair. For the sake of argument say it is a slow betting race, 20 minutes before the off, and the next price change is 1:15:08.2 (eight seconds later) – hope my question makes sense, I am clutching straws trying to figure out why my bets did not arrive at Betfair last Sunday - best regards Paul
bolpx001
 
Posts: 297
Joined: Sat Nov 19, 2005 4:30 am
Location: Dublin, Ireland

Re: how does excel get updated by BA

Postby MarkRussell » Tue Dec 05, 2017 6:09 pm

Hi,

The trigger column is read and actioned at each price refresh.
So for example, let's say you have a 10 second refresh rate and the trigger column is updated 1 second after a refresh then it won't be actioned until the next refresh 9 seconds later.

Regards,
Mark
User avatar
MarkRussell
Site Admin
 
Posts: 1787
Joined: Tue Feb 20, 2007 6:38 pm
Location: Birmingham

Re: how does excel get updated by BA

Postby bolpx001 » Tue Dec 05, 2017 6:36 pm

Thanks Mark, Does that mean if there is no price movement for 10 seconds then no refresh occurs until the 10 seconds have passed. The system used to update, depending on setting every .2 of a second, can I go back to that or force and update. - best regards Paul
bolpx001
 
Posts: 297
Joined: Sat Nov 19, 2005 4:30 am
Location: Dublin, Ireland

Re: how does excel get updated by BA

Postby bolpx001 » Tue Dec 05, 2017 6:39 pm

Sorry should read:

Thanks Mark, Does that mean if there is no price movement for 10 seconds then no refresh occurs until the 10 seconds have passed. The system used to update, depending on setting every .2 of a second, can I go back to that or force an update. - best regards Paul
bolpx001
 
Posts: 297
Joined: Sat Nov 19, 2005 4:30 am
Location: Dublin, Ireland

Re: how does excel get updated by BA

Postby alrodopial » Wed Dec 06, 2017 11:23 am

two cases:
1. Full stream on ( different than just "stream on" )
bet will be placed whenever next price change occurs (0.3sec, 5 secs, 25 secs etc )
2. Full stream of
bet will be placed when next update happens (from your refresh rate)
ie the 9 secs example Mark gave above
alrodopial
 
Posts: 1353
Joined: Wed Dec 06, 2006 9:59 pm

Re: how does excel get updated by BA

Postby Captain Sensible » Wed Dec 06, 2017 2:06 pm

MarkRussell wrote:Hi,

The trigger column is read and actioned at each price refresh.
So for example, let's say you have a 10 second refresh rate and the trigger column is updated 1 second after a refresh then it won't be actioned until the next refresh 9 seconds later.

Regards,
Mark


Not too clear on this as I'd imagine any macro would update the trigger columns in less than a second. So does that mean BA picks up data from trigger column prior to updating the price data and sends any bets from that then updates price data. Effectively meaning someone betting with a 60 second refresh rate would have their bets placed at the next refresh from when they updated the excel sheet?
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Re: how does excel get updated by BA

Postby alrodopial » Wed Dec 06, 2017 3:40 pm

Garry will confirm it but here how it goes:

ba reads for any triggers in excel (and Q2 cell), updates prices in excel, your macros run (since there is a 16 columns change) and place any triggers in excel
and in next refresh
ba reads for any triggers in excel, places your bet because there are triggers now in column Q, updates prices in excel etc
alrodopial
 
Posts: 1353
Joined: Wed Dec 06, 2006 9:59 pm

Re: how does excel get updated by BA

Postby Captain Sensible » Wed Dec 06, 2017 3:49 pm

Thanks alrodopial, that's the way I assumed BA worked by the fact any adjustements to the trigger columns weren't actually picked up and actioned until the next refresh
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Re: how does excel get updated by BA

Postby GaryRussell » Thu Dec 07, 2017 10:28 am

The triggers are read after the prices are updated which causes Excel to recalculate. Therefore a formula in the trigger cell will be calculated immediately after the prices are updated. BA reads the trigger cells immediately after this calculation so bets will be triggered on the same refresh.

Consider the following VBA. Set BA to a slow refresh rate like 10 seconds. Just after a refresh enter 1 in cell Z1. You will see the bet get triggered on the next refresh. You should populate the trigger cells during the worksheet change event after it has refreshed the prices. Notice that events are also disabled while the cells are being populated as they would trigger the change event while you are trying to update them leading to unpredictable results.

Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Columns.Count = 16 Then
        If [Z1] = 1 Then
            Application.EnableEvents = False
            [Z1] = 0
            [Q5] = "BACK"
            [R5] = 1000
            [S5] = 2
            Application.EnableEvents = True
        End If
    End If
End Sub
User avatar
GaryRussell
Site Admin
 
Posts: 9679
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Re: how does excel get updated by BA

Postby Captain Sensible » Thu Dec 07, 2017 2:39 pm

Thanks Gary, I guess with a slow refresh the bets manager wouldn't get updated until the following refresh giving the impression bets weren't sent on the initial refresh.

With the new streaming version does the bets manager/profit column get updated independantly of the price refresh?

And finally , I notice BA sends the additional column data after the price refresh, would BA be able treat these as two worksheet change events for bet placement or does it only register after both sets of data have been written to excel then reprot back to BA before sending any trigger requests.


thanks
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Re: how does excel get updated by BA

Postby mike » Tue Dec 12, 2017 12:06 pm

Hi All,

I have been expirimenting with combinations of Price Stream, Order Stream, Full Stream and refresh rate settings.

I noticed that:
1) with PS, OS and FS set to on, a bet is placed after a price change in the market.
2) with PS, OS set to on and FS set to off, a bet is placed after a refresh.

For me 2) would be the best choice since I don't have to wait with a bet for a price change.

I suppose the disadvantage of 2) compared to 1) is that in setting 1) you can react immediately to a price change and that setting 2) use more bandwith?

(Although since I have calculation set to off and give a VBA-calculate command every second, I can't react immediately to a price change.)

thanks,
Mike
mike
 
Posts: 120
Joined: Sat Dec 30, 2006 2:36 pm

Re: how does excel get updated by BA

Postby mike » Wed Dec 13, 2017 2:16 pm

Hi,

I am still confused about the streaming options.

I tested today with Price Streaming (PS) and Order Streaming (OS) set to ON and Full Streaming (FS) set to OFF and a very low refreshrate of 10 seconds.
I noticed that the market is refreshing at 10 seconds in this case.
This looks the same to me as the original BA without streaming or do I miss something? What is the meaning of Price Streaming set to ON in this case?

Thanks,
Mike
mike
 
Posts: 120
Joined: Sat Dec 30, 2006 2:36 pm

Re: how does excel get updated by BA

Postby alrodopial » Wed Dec 13, 2017 3:40 pm

some info here:
viewtopic.php?f=3&t=9609&start=15

take a look at "new releases" topics too
alrodopial
 
Posts: 1353
Joined: Wed Dec 06, 2006 9:59 pm

Re: how does excel get updated by BA

Postby mike » Wed Dec 13, 2017 9:36 pm

I should had indeed read that post first. So the difference is that the data is streamed to BA cache which polls it at every refresh, instead of polling by BA from the API. Clear to me now. Thanks.
mike
 
Posts: 120
Joined: Sat Dec 30, 2006 2:36 pm


Return to Discussion

Who is online

Users browsing this forum: No registered users and 22 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.