Determine whether ATP or WTA automatically - baf

Post Reply
sniffer66
Posts: 1666
Joined: Thu May 02, 2019 8:37 am

I'm on a bit of a quest to push the boundaries of what can be done in Guardian re tennis automation.
I approach automation for the mens and womens game differently, due to variations in the play, so have differing rule sets based on each gender. But I have to apply those manually in Guardian.

Using the new text comparison condition in the latest version, I realised over the weekend that by using a list from the mens ranking and the same from the womens that it would be possible to set an SV via a Text Comparison rule and tailor the entry rules based on that SV having a value.
This is possible as the player surnames appear in the market name.

Each rule contains a list of the current surnames in the rankings, extracted from the Tennis Abstract site.
1349 Women
1972 Men

To get around the issue of duplicate names, double barrelled etc I've used 2 conditions in each rule (each rule runs once per match)

"<Player Surname> v "
" v <Player Surname>"

This checks both players are in the men's list ( same for the women)
Both must match for the SV to be set. If there is no match for men or for women an SV is set "GenderNotFound = 1"

if there is a match ONE of the following Market SV's is set:

WTA = 1

or

ATP = 1

Taking this further, it's possible to compile a list of say, strong returners or weak servers and add them to another like rule. By matching them as "<Player Name> v " you know that the player is in BF Position 1 ( or P2 for " v <Player Name>") and can create corresponding entry rules for a Lay the Server rule, for example.

Bear in mind the player lists will need updating on a regular basis.

ATP or WTA.baf
You do not have the required permissions to view the files attached to this post.
Last edited by sniffer66 on Mon Sep 21, 2020 5:13 pm, edited 2 times in total.
Trader Pat
Posts: 4327
Joined: Tue Oct 25, 2016 12:50 pm

sniffer66 wrote:
Mon Sep 21, 2020 3:55 pm
I'm on a bit of a quest to push the boundaries of what can be done in Guardian re tennis automation.
I approach automation for the mens and womens game differently, due to variations in the play, so have differing rule sets based on each gender. But I have to apply those manually in Guardian.

Using the new text comparison condition in the latest version, I realised over the weekend that by using a list from the mens ranking and the same from the womens that it would be possible to set an SV via a Text Comparison rule and tailor the entry rules based on that SV having a value.
This is possible as the player names appear in the market name.

Each rule contains a list of the current surnames in the rankings, extracted from the Tennis Abstract site.
1349 Women
1972 Men

To get around the issue of duplicate names I've used 2 conditions in each rule (each rule runs once per match)

"<Player Name> v "
" v <Player Name>"

This checks both players are in the men's list ( same for the women)
Both must match for the SV to be set. If there is no match for men or for women an SV is set "GenderNotFound = 1"

if there is a match ONE of the following Market SV's is set:

WTA = 1

or

ATP = 1

Taking this further, it's possible to compile a list of say, strong returners or weak servers and add them to another like rule. By matching them as "<Player Name> v " you know that the player is in BF Position 1 ( or P2 for " v <Player Name>") and can create corresponding entry rules for a Lay the Server rule, for example.

Bear in mind the player lists will need updating on a regular basis.


ATP or WTA.baf


Nicely done 👍
User avatar
jimibt
Posts: 3641
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

nice bit of functionality. I can see this approach being useful in all other sorts of sports, tho it then immendiately becomes quite a burden to keep everythig up to date.

I then had a lightbulb moment. why not have an additional option on the Text Comparison condition that points directly to a single column/multiline text file. that way, you'd only need to maintain the text file and wouldn't need to open the rule to add/remove entries. The criteria would remain the same (i.e. Market name contains at least one of the following -etc). So in essence, you'd choose between Text Items or file location.
sniffer66
Posts: 1666
Joined: Thu May 02, 2019 8:37 am

jimibt wrote:
Mon Sep 21, 2020 4:38 pm
nice bit of functionality. I can see this approach being useful in all other sorts of sports, tho it then immendiately becomes quite a burden to keep everythig up to date.

I then had a lightbulb moment. why not have an additional option on the Text Comparison condition that points directly to a single column/multiline text file. that way, you'd only need to maintain the text file and wouldn't need to open the rule to add/remove entries. The criteria would remain the same (i.e. Market name contains at least one of the following -etc). So in essence, you'd choose between Text Items or file location.
That would make life much easier. Then it's easily managed via a script or Excel to say, screen scrape the data and populate the text file automatically...

It's only useful for sports where you have 2 runners\players\teams though, beyond that you dont get selection names in the market name.
sniffer66
Posts: 1666
Joined: Thu May 02, 2019 8:37 am

Trader Pat wrote:
Mon Sep 21, 2020 4:03 pm
sniffer66 wrote:
Mon Sep 21, 2020 3:55 pm
I'm on a bit of a quest to push the boundaries of what can be done in Guardian re tennis automation.
I approach automation for the mens and womens game differently, due to variations in the play, so have differing rule sets based on each gender. But I have to apply those manually in Guardian.

Using the new text comparison condition in the latest version, I realised over the weekend that by using a list from the mens ranking and the same from the womens that it would be possible to set an SV via a Text Comparison rule and tailor the entry rules based on that SV having a value.
This is possible as the player names appear in the market name.

Each rule contains a list of the current surnames in the rankings, extracted from the Tennis Abstract site.
1349 Women
1972 Men

To get around the issue of duplicate names I've used 2 conditions in each rule (each rule runs once per match)

"<Player Name> v "
" v <Player Name>"

This checks both players are in the men's list ( same for the women)
Both must match for the SV to be set. If there is no match for men or for women an SV is set "GenderNotFound = 1"

if there is a match ONE of the following Market SV's is set:

WTA = 1

or

ATP = 1

Taking this further, it's possible to compile a list of say, strong returners or weak servers and add them to another like rule. By matching them as "<Player Name> v " you know that the player is in BF Position 1 ( or P2 for " v <Player Name>") and can create corresponding entry rules for a Lay the Server rule, for example.

Bear in mind the player lists will need updating on a regular basis.


ATP or WTA.baf


Nicely done 👍
Cheers. The concept opens up a few possibilties, without having to resort to Excel
User avatar
Dabbla
Posts: 662
Joined: Wed Apr 15, 2009 1:50 pm

I have never looked at the text comparison condition. Thank for posting, it’s always good to learn new tricks. :D
sniffer66
Posts: 1666
Joined: Thu May 02, 2019 8:37 am

Dabbla wrote:
Mon Sep 21, 2020 5:03 pm
I have never looked at the text comparison condition. Thank for posting, it’s always good to learn new tricks. :D

First time I've ever used it to be honest. I viewed it on first look as just a way of restricting which markets the automation traded. Then another post on the subject gave me a lightbulb moment :)
User avatar
jimibt
Posts: 3641
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

sniffer66 wrote:
Mon Sep 21, 2020 4:42 pm
jimibt wrote:
Mon Sep 21, 2020 4:38 pm
nice bit of functionality. I can see this approach being useful in all other sorts of sports, tho it then immendiately becomes quite a burden to keep everythig up to date.

I then had a lightbulb moment. why not have an additional option on the Text Comparison condition that points directly to a single column/multiline text file. that way, you'd only need to maintain the text file and wouldn't need to open the rule to add/remove entries. The criteria would remain the same (i.e. Market name contains at least one of the following -etc). So in essence, you'd choose between Text Items or file location.
That would make life much easier. Then it's easily managed via a script or Excel to say, screen scrape the data and populate the text file automatically...

It's only useful for sports where you have 2 runners\players\teams though, beyond that you dont get selection names in the market name.
i guess that it could also contain the Event name so that if pointed to ALL races for the day, it could pickup and action only names that appeared in the file. This file could be refreshed by all sorts of means... anyway
User avatar
paspuggie48
Posts: 611
Joined: Thu Jun 20, 2013 9:22 am
Location: South-West

Nice idea to use a SV. I use the text comparison quite often and struggle a bit with some texts, so may delve into using your solution :)
sniffer66
Posts: 1666
Joined: Thu May 02, 2019 8:37 am

paspuggie48 wrote:
Tue Sep 22, 2020 5:10 pm
Nice idea to use a SV. I use the text comparison quite often and struggle a bit with some texts, so may delve into using your solution :)
In the old days I'd use a signal but seeing as you can set\unset more than one SV per rule (as opposed to one signal) , plus you can now set detect time since SV change I don't tend to use signals much.
sniffer66
Posts: 1666
Joined: Thu May 02, 2019 8:37 am

Well, that actually tested out succesfully.

Create a rule to set an SV for detected ATP or WTA. Create an SV Rule for each player position by weak serve/strong receiver, populating each via a Text Comparison list based on whether listed 1st or 2nd in the Market name.

Then set up the Every Selection entry rule with a set of nested groups, so only one can match. In this case, If the automation finds an ATP match with a weak server an early break up against a strong returner it will place the trade. All completely dynamic, once the lists are populated from a stats site.
Quite a few permutations you could add to the list SV's as well - break back %, split by surface, recovery from set down against top 50 etc

Coupled with the automation that grabs in the in-play stats this is going to be slightly useful.


Capture.JPG






Capture2.JPG
You do not have the required permissions to view the files attached to this post.
User avatar
Dallas
Posts: 22673
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Image


Amazing stuff
zippus
Posts: 181
Joined: Thu Jun 13, 2019 3:19 pm

I've noticed that Sofascore matches almost always contains the player's gender. I've managed to extract it using the AutoIt coding Stu shared a while back. I'm not a programmer but it's pretty easy to pull it into a shared value using the following command:

Json_Get($object, '.events' & '[' & $i & '].homeTeam.gender')

It returns an "M" or "F", so I'm assuming it's easy enough to convert this into say '0' and '1' to flag the gender. Here is the full string that gets the scores plus gender.

$HomeString = $HomeString & "SS,Set1," & Json_Get($object, '.events' & '[' & $i & '].homeScore.period1') &"," & "SS,Set2," & Json_Get($object, '.events' & '[' & $i & '].homeScore.period2') &"," & "SS,Set3," & Json_Get($object, '.events' & '[' & $i & '].homeScore.period3') &"," & "SS,Set4," & Json_Get($object, '.events' & '[' & $i & '].homeScore.period4') &"," & "SS,Set5," & Json_Get($object, '.events' & '[' & $i & '].homeScore.period5') &"," & "SS,Point," & Json_Get($object, '.events' & '[' & $i & '].homeScore.point') &"," & "SS,Gender," & Json_Get($object, '.events' & '[' & $i & '].homeTeam.gender')

$AwayString = $AwayString & "SS,Set1," & Json_Get($object, '.events' & '[' & $i & '].awayScore.period1') &"," & "SS,Set2," & Json_Get($object, '.events' & '[' & $i & '].awayScore.period2') &"," & "SS,Set3," & Json_Get($object, '.events' & '[' & $i & '].awayScore.period3') &"," & "SS,Set4," & Json_Get($object, '.events' & '[' & $i & '].awayScore.period4') &"," & "SS,Set5," & Json_Get($object, '.events' & '[' & $i & '].awayScore.period5') &"," & "SS,Point," & Json_Get($object, '.events' & '[' & $i & '].awayScore.point') &"," & "SS,Gender," & Json_Get($object, '.events' & '[' & $i & '].awayTeam.gender')
Post Reply

Return to “Bet Angel Automation - Tennis”