Triggers did not clear

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

Moderator: 2020vision

Triggers did not clear

Postby Barb » Wed Dec 22, 2021 5:56 am

I bet on wins and places in gallops. I use triggered Excel with VBA code. I just had a result that should have returned a small profit, but there was a problem. Betfair took an inordinately long time to settle the bets and I know from experience that that's usually a sign that there's grief to follow. Sure enough, I found that place bets had been placed in the next race, which I did not bet on. It was not a mistake at Betfair's end, because I saw the stakes and matches in my spreadsheet and they appear in the BA diagnostic log. The relative positions of the horses in the runner list in the second race - the ones I did not knowingly bet on - were exactly the same as the relative positions of the horses in the runner list of the first race - the ones I did bet on. This can mean only one thing: the BACK-SP triggers were not deleted from the spreadsheet. However, it should be noted that that occurred only in the worksheet in which I do place bets and not the sheet in which I do win bets. Of note are the following:
- as I mentioned, Betfair's settling of the bets took a long time;
- there was a late scratching, just before off;
- I have 'clear bet refs on auto select markets' turned on in the Excel options - maybe it is best to turn this off, because, obviously, the triggers will fire again if, for some reason, they are not deleted (see code below);
- the races were seven minutes apart and I load the new market at 25 secs before off, so there is no chance that triggers for one market fired as another market was loading;
- at the start of the worksheet.change event I run this code:

Application.EnableEvents = False
If Target.Columns.Count = 16 Then
' get the market ID
sNewMarket = wsWinWorksheet.Cells(3, 14).Value
' clear the sheet when a new market loads
If sNewMarket <> sOldMarket Then
With wsWinWorksheet
' clear the trigger column
.Range("q5", "q22").ClearContents
wsPlaceWorksheet.Range("q5", "q22").ClearContents
' clear the stake column
.Range("s5", "s22").ClearContents
wsPlaceWorksheet.Range("s5", "s22").ClearContents
' clear the bet ref column
.Range("t5", "t22").ClearContents
wsPlaceWorksheet.Range("t5", "t22").ClearContents
' clear the bet time column
.Range("u5", "u22").ClearContents
wsPlaceWorksheet.Range("u5", "u22").ClearContents
sRaceDetails = .Cells(1, 1).Value
End With
As you can see from the code, the win and place sheets are cleared at exactly the same time and in the same piece of code, but in this one instance the place sheet did not clear, which would seem to be impossible! This error does not seem to be related to BA, unless BA in some way prevented the sheet from being cleared or undid the deletion of the triggers by my code. I should stress that it has never happened before - as far as I am aware.
I've sent the diagnostic log to admin@ and I would appreciate any thoughts you might have.
Thanks.
Barb
 
Posts: 9
Joined: Thu Oct 01, 2020 12:26 am

Re: Triggers did not clear

Postby Barb » Wed Dec 22, 2021 6:18 am

I just noticed that the stakes for the bets place inadvertently in the second race are exactly the same as those that were placed in the first race, so, obviously, both the Trigger and Stake columns did not clear. The odds were different but that's only because the odds reflect whatever the current offered odds are.
Barb
 
Posts: 9
Joined: Thu Oct 01, 2020 12:26 am

Re: Triggers did not clear

Postby Captain Sensible » Wed Dec 22, 2021 1:25 pm

Without seeing the actual betting code or how you navigate markets it's hard to say, but sometimes the API sends duff data so you just have to try to ensure the code that sends bets is bullet proof. BA populates the market data before sending bets so in theory your trigger columns should have cleared by the VBA.

Not much help I'm afraid but if BA was retaining betting triggers lots of people would be reporting rogue bets so it does point to a VBA issue rather than Gruss. Maybe give the race details also as others will probably have bet those races and may have spotted API issues in their logging.
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Re: Triggers did not clear

Postby Barb » Wed May 18, 2022 3:03 am

For the information of anyone else who has this problem, it is being caused by momentary interruptions to my broadband service - I'm tethered to a mobile. The workaround is to uncheck the 'Clear bet refs on auto select market' box in the BA--Excel--Log Current Prices dialog box.
Barb
 
Posts: 9
Joined: Thu Oct 01, 2020 12:26 am


Return to Discussion

Who is online

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

cron