Trading Football is often thwarted because you don't know the actual current score within Guardian. Unfortunately the Betfair API doesn't provide this information - and for the life of me I don't know why, considering they know it and display it in their UI. Therefore we are left to guestimate it by using various trickery monitoring odds changes and incrementing counters. I've seen a few solutions in this forum but they are a bit flaky, I have observed, because they rely on odds moving and sometimes odds don't move in the same way. The problem is compounded with the introduction of VAR because a lot of goals get credited and then later, chalked off. Trying to contend with this is a problem. These solutions do work but not all the time and I am loathed to stake real money on them because they do get it wrong - quite a lot.
I am a professional software developer and have used the Betfair API for many years and always had a notion on how to tackle this using the API and never got round to it. Last year I started using BetAngel for my betting/trading.
On a side note I would like to say that BA and Guardian is an awesome piece of technology. The time it takes me to develop a strategy using the API was long and arduous - it might take several days to try something out, only to discover it was a non-starter and I was back to square one. With Guardian I can knock something up in a matter of minutes - try it out and determine if it's got legs. I think what Peter Webb has created (with his team) is a miracle.
So, I have finally got round to looking at determining the current live score. Please find the BAF file below. It requires the Correct Score Market to be selected. It works by getting the lay odds of each selection and then finding out which selections arte no longer active. These selections tend to show lay odds as empty or high numbers 990 and beyond.
Every match starts at 0-0. If the lay odds show any value (up to 990), then I can be sure its still 0-0. If the home side score first, the score goes to 1-0. The lay odds for 0-0 then show as empty, as well as 0-1 - because 0-1 is an impossible result. If the score then goes to 1-1, the odds for 0-0,1-0,0-1 are empty. This approach can be used to decide the score until we reach Any Other Home Win/Away Win/Draw. When this happens all the other scores will be empty and we just need some comparing of odds between the Any Other selections.
There are some gotchas and this isn't foolproof. Sometimes when goals go in the odds on Correct Score selections can go a little wonky - particularly low volume matches. So its possible to see incorrect scores for a short time - if this happens you'll see they typically rectify themselves. I have seen some matches go immediately to HW because the 0-0 shows as empty but that is infrequent and not in high profile matches. The rules run every 30 secs - so be prepared to wait a minute - you can change this if you like.
This is the 3rd version. The first attempt was to prove it would work. The second worked but it was an extremely big BAF using a lot of conditions that slowed everything down. The third attempt does it in a slightly different, but more efficient way, counting the home goals and away goals then combining them for the score.
The scoreline is in an event stored value called CurrentScore
The correct score code (1-19) is an event stored value called Score
I hope this helps. Happy trading!
Let me know if you discover any issues!
Football - knowing the CURRENT SCORE
Thanks for sharing this I'm looking forward to giving it a go, It's something I've often considered doing but the laboriousness of setting it up often meant it kept getting pushed down the to do list.
If it works well and with your permission I might include it with the existing examples that display the score on the one-click screen and watchlist etc
-
- Posts: 201
- Joined: Wed Aug 05, 2020 11:45 am
Just a note
This BAF won;t open with BA version 1.60.0
Which I believe is the curren version
Goldfinch
This BAF won;t open with BA version 1.60.0
Which I believe is the curren version
Goldfinch
For consistency, automation created in later versions is only compatible with that version onwards. Else it gets horrifically complicated.
V1.61 will officially be released and added to the Bet Angel website as the latest version very soon so I wouldn't bother editing to be compatible with V1.60
Once a new beta is released on the forum all the examples I post thereafter use that version (even if the example doesn't use any of the new options/features), if people want to use it they will update their version
This sounds really useful.
Can I just check that there is nothing else to do other than download the BAF file which I have done but not tried it yet. So do I just add a Correct Score market to Guardian and then just apply the rule to this selection?
Does it then display the columns as shown in the snapshot you have included. Or do we need to adapt custom columns? If it is the latter, is this straightforward to do?
Mike
Can I just check that there is nothing else to do other than download the BAF file which I have done but not tried it yet. So do I just add a Correct Score market to Guardian and then just apply the rule to this selection?
Does it then display the columns as shown in the snapshot you have included. Or do we need to adapt custom columns? If it is the latter, is this straightforward to do?
Mike
Hi Mark. You pretty much got it. The score is saved in the stored value "CurrentScore" it is stored against the event meaning you can refer to it on other automation files you are using at the time. You will have to include it in your list yourself, so the screenshot I posted I had saved a column with CS as the column header and CurrentScore (event) as the value and included that column iny list. Hope it helps.
Be good to hear if others find it useful?
Be good to hear if others find it useful?
This works amazingly well. It took me a while to realise that I needed to change the custom column to pick up CurrentScore from the Event, not the Market, before it suddenly started to display the scores.
So thanks for this. It is so useful. I trade, dutching the correct scores, quite a lot and it is great for that because I don't have to keep checking FlashScore to check what the current score is if I am trading several games at the same time. The info is updated in real time all in one place on Guardian.
So thanks for this. It is so useful. I trade, dutching the correct scores, quite a lot and it is great for that because I don't have to keep checking FlashScore to check what the current score is if I am trading several games at the same time. The info is updated in real time all in one place on Guardian.