Football second half timing

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
SabaiSabai
Posts: 8
Joined: Thu Aug 10, 2017 3:58 pm

Hi Dallas,

I would like to make a simple automation on football matches.
I would like to activate auto bets in the second half due to specific odds at at a specific game time.
In these covid19 times it is quite difficult to calculate second half time running from start of the game...

Let us say I like to let my bot start to activate at the 75. minute of the game, or 30 minutes into the second half or 15 mins to go + add time.
A few years ago I would simply activate the bot after (45 + 2 normal additional time + 15 brake + 2 (late after brake) + 30) around 94 minutes all over from start to be in around 75 minutes of the match.

These days that is not so easy. There are drinking pauses, a few ekstra substitutions available,
VAR decisions that can last for minutes etc.
The semi final between Chelsea and Man U had 11 minutes additional time just in the first half.

So, it is difficult to calculate second half run time depending on start time of a match and a bot may activate on "wrong time".

If my bot could start 30 minutes from start of the second half it would have been much more accurate.
But the best for this would of course been a bot that starts to activate exactly after 75 minutes on the clock sharp.
Would bring in better results too...
it should be easy for you to implement start time of second half, or?

Question:
How is the best way to calculate second half timing?
User avatar
Dallas
Posts: 22726
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

If you keep an eye on the shared football section over the coming days
viewforum.php?f=50

Leecal will shortly be uploading one that should suit your needs, it will start counting from the moment the 1st half ends, so assuming the break lasts the right amount of time that will give you a very close 2nd half time.
Obvioustly there still be the water break misway through you'll need to account for if triggering late in the match but there's no working around that
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

It would be easy if Betfair supplied the data to do it, but they don't, only information about when the match starts and ends. Judging by the number of false event status changes they make that's probably a good thing.

I'd imagine the best you could do would be to look for a period of price stability to gauge when the halftime break is occuring, or to look for a period of price stability followed by a period of instablity to signal that the break is over. You'd use a relative odds condition to do that, and obviously only check for these conditions in a timeframe that's likely to contain the break. Once break occuring or break ending has been identified you could use a timer (eg a signal that increments by 1 every second) to judge what 2nd half minute is currently being played.

Basically price movement or the lack of price movement should give you pointers as to when action is occuring or not, and you can build something around that. It might take some tuning but apart from that it should be pretty straightforward.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Dallas wrote:
Mon Jul 27, 2020 1:20 am
Obvioustly there still be the water break misway through you'll need to account for if triggering late in the match but there's no working around that
Presumably if you were actively monitoring the games you could manually initiate a servant on each game at the resumption which would set a value that any bot attached to the same event could use as sign the 2nd half had started? Slight overkill maybe but depending on the accuracy you need to could potentially get it spot with no false triggers, and then leave the bot to manage the rest of the half.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Dallas wrote:
Mon Jul 27, 2020 1:20 am
If ....
Could you link it to the closure of or prices in the halftime markets?
Last edited by ShaunWhite on Mon Jul 27, 2020 1:46 am, edited 1 time in total.
User avatar
Dallas
Posts: 22726
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

ShaunWhite wrote:
Mon Jul 27, 2020 1:37 am
Dallas wrote:
Mon Jul 27, 2020 1:20 am
Obvioustly there still be the water break misway through you'll need to account for if triggering late in the match but there's no working around that
Presumably if you were actively monitoring the games you could manually initiate a servant on each game at the resumption which would set a value that any bot attached to the same event could use as sign the 2nd half had started? Slight overkill maybe but depending on the accuracy you need to could potentially get it spot with no false triggers, and then leave the bot to manage the rest of the half.
Yea if watching the game, you could just start a servant that increment a signal every second, and use that as your 2nd half timer, or a servant that sets a signal then use the signal changed condition within your rule.
Even if BF just done a quick suspened/unsuspend seconds before 2nd half KO that would make it much easier, its not as if they don't have people watching the match some getting over excited with the suspend button during regular game play as it is
User avatar
Dallas
Posts: 22726
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

ShaunWhite wrote:
Mon Jul 27, 2020 1:43 am
Dallas wrote:
Mon Jul 27, 2020 1:20 am
If ....
Could you link it to the closure of the halftime markets?
Not directly because the rule can't trigger on an already suspended market even to set a signal

but it can be done in a reverse way, which is how Lee's bot will work ie, set a signal every few seconds on the HT market, then if that hasn't updated for 10secs that means the markets closed.
You'd then take the last value to work out when the 1st half ended and what the 2nd half time is (less the 15mins break itself)
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Dallas wrote:
Mon Jul 27, 2020 1:47 am
set a signal every few seconds on the HT market, then if that hasn't updated for 10secs that means the markets closed.
yeah that's the sort of thing I meant by linking them to the HT market closures....or more accurately them not being closed.
Not so great on smaller games with no HT markets but you can't have everything I guess.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Dallas wrote:
Mon Jul 27, 2020 1:44 am
Even if BF just done a quick suspened/unsuspend seconds before 2nd half KO that would make it much easier,
nooooo !!! Don't encourage them to use their nuclear button even more! I'd be happier with no suspensions like it is in...pretty much most other sports. And for them to just pass the match status in the existing API 'Race Status' field, not too much to ask for really.
:)
brooksie55
Posts: 9
Joined: Tue Aug 20, 2019 8:15 pm

Dallas wrote:
Mon Jul 27, 2020 1:20 am
If you keep an eye on the shared football section over the coming days
viewforum.php?f=50

Leecal will shortly be uploading one that should suit your needs, it will start counting from the moment the 1st half ends, so assuming the break lasts the right amount of time that will give you a very close 2nd half time.
Obvioustly there still be the water break misway through you'll need to account for if triggering late in the match but there's no working around that
Hi Dallas,

Can't see anything from Leecal on the forum at the moment re signal for end of 1st half.......do you know if this is still planned?

Thanks,
brooksie55
User avatar
LeeCaL
Posts: 60
Joined: Mon Nov 26, 2018 9:02 pm

Hi,

The bot is ready and fully tested. It accurately identifies the end of the 2nd half by using the Half Time Correct Score market to send out a stored signal every 10secs from min 45.

Then by using the new "stored value changed condition" you can identify the current time in the 2nd half. For example if you wanted to identify the 60th min, you would add 15min for the HT break and then another 15mins from the start of the 2nd half to the 60th min.

However, during mass testing, I noticed that not all matches have a strict 15min HT break. Top divisions generally do but some lower leagues have 10mins which defeats the objective.

I will re-visit this possibly using the approach ShaunWhite mentioned where you identify the HT period as there should be little odds time decay during this period.

Cheers,
Lee
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

LeeCaL wrote:
Thu Aug 20, 2020 9:23 am
I will re-visit this possibly using the approach ShaunWhite mentioned where you identify the HT period as there should be little odds time decay during this period.
It's a trickier than it at first seems, combining a number of clues would certainly make it more resilient but whatever game status indicator you derive it definately needs to provide for a status that means 'unknown'. Life would be so much easier if they just used the raceStatus to store the game status, then again with the issues they have maintaining the market statuses these days, doing it by what markets do/don't currently exist and which prices are on the move is probably the best solution anyway. Good luck with it, I'm sure lots of people will find it useful.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Maybe the easy answer is a 15-min break bot and a 10-min break bot? Sometimes a slick solution causes more agro than it's worth.
User avatar
LeeCaL
Posts: 60
Joined: Mon Nov 26, 2018 9:02 pm

ShaunWhite wrote:
Thu Aug 20, 2020 1:57 pm
Maybe the easy answer is a 15-min break bot and a 10-min break bot? Sometimes a slick solution causes more agro than it's worth.
You have read my mind Shaun. Currently looking at individual leagues to see if I can identify which leagues have 10 mins & 15 mins then the Chinese game I had it set on had 13 mins HT break! :lol:

I think I will accept a few mins either way. The main issue currently is if there are 10 minutes injury time due to extra breaks or a serious injury it can have a big knock on for 2nd half bets if they need to be around a specific time.

I will post the bot tonight or tomorrow after I make a quick video for it.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Yep the best way to fix a problem is sometimes to just make the problem go away, but the real skill is then selling that as a feature rather than a limitation. You'll have a much more robust bot if it's not so dependant on what you can't control or reliably predict.... according to the sales literature :)
Post Reply

Return to “Bet Angel - Automation”