Running count of price refreshes???

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
apollo
Posts: 3
Joined: Sat Jul 27, 2019 11:40 pm

Hi, I'm new to Bet Angel (and VBA!), although I've used Excel a fair bit. I was wondering if there was a way to take a running count of the refreshes of the price feeds to the Excel spreadsheet, particularly during in-play.

I thought it could be done using Sub Worksheet_Change. This seems to work when I make manual changes to cells, but not when the prices update from Betfair. :?

I'd be very grateful for any tips on how this could be done.

Cheers.
sa7med
Posts: 800
Joined: Thu May 18, 2017 8:01 am

apollo wrote:
Sun Jul 28, 2019 12:01 am
Hi, I'm new to Bet Angel (and VBA!), although I've used Excel a fair bit. I was wondering if there was a way to take a running count of the refreshes of the price feeds to the Excel spreadsheet, particularly during in-play.

I thought it could be done using Sub Worksheet_Change. This seems to work when I make manual changes to cells, but not when the prices update from Betfair. :?

I'd be very grateful for any tips on how this could be done.

Cheers.
Hi Apollo, welcome to the forum. You are correct in that you could use the worksheet_change event to have a running count of refreshes and it could go something like this :

Private Sub Worksheet_change(ByVal Target As Range)

If Not Application.Intersect(Range("$C$4"), Range(Target.Address)) _
Is Nothing Then
range("$H$4").value = range("$H$4").value + 1
End If

End sub
apollo
Posts: 3
Joined: Sat Jul 27, 2019 11:40 pm

Thanks sa7med, sorry for late acknowledgment, been tied up with other things. I was thinking about in-play automated trading but I'm a bit wary. Anyway, I'll have a play with it. Thanks again.
User avatar
Dallas
Posts: 22722
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

apollo wrote:
Mon Aug 12, 2019 1:15 am
Thanks sa7med, sorry for late acknowledgment, been tied up with other things. I was thinking about in-play automated trading but I'm a bit wary. Anyway, I'll have a play with it. Thanks again.
Is there any particular reason you need to know the number of price refreshes?
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

apollo wrote:
Mon Aug 12, 2019 1:15 am
I was thinking about in-play automated trading but I'm a bit wary.
#refreshes will probably be very close to your refresh rate. In fact in the latter stages of a race there are often far more api data changes than the max 50 per second (20ms) refresh.
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”