Number of Selections as a Stored Value (Template) Guardian Automation Bot

Post Reply
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

This is a basic Guardian automation template containing rules to derive the number of selections in a market into a Stored Value.

This example does nothing other than store a value named ‘selections’ with the number of selections there is in the market.

If you have existing rules that need to check or reference the number of selections/runners in a market as a stored value then you can simply copy the rules from this file into your existing file then add the appropriate conditions

For example you might want to stop a rule from triggering if a runner is withdrawn in the final minutes, you could therefore run these rules at the top of your file to find the number of runners several minutes before the off.
Then run another rule to test the number of runners every 30 seconds or so and compare the two values, if the latest value is less than the original it means a runner has been withdrawn, you can then use this to stop you rules and green up any open positions


How it Works

There are two rules in this file, the first rule triggers once and stores a value for the market named 'Selection' with an entered amount of 1
The next rule can trigger multiple times and stores a value named selections with an entered amount 1, plus another stored value named 'selections'

Effectively each time the second rule triggers on a selection its adding a value of 1 to the current stored value and therefore incrementing the value by 1 each selection it triggers on.

Because both rules are applied to 'ANY' selection, so that each selection is only counted once, when it triggers it also sets a signal on the selection named 'counted', the rules also have a 'Signal Set' condition to test the signal named 'counted on a selection is NOT set with a value.
ie, it checks if a selection has a signal set and if not it triggers on it and counts its as a stored value and at the same time sets a signal on it so its not counted a second time.


Using the File

To use the file just click on the following Number of Selections SV (Template).baf and this will download them to your computer, then with guardian open on the "Automation" tab click "Import a Rules File" as shown in the image, once imported it will now appear in the drop-down box just above, you can now apply them to any markets you have added into guardian.
Once you have it imported into your Guardian the stake size along with any other aspects of this file can be edited very easily by clicking on "Edit Rules File".

With any automation bot always run in practice mode first to ensure everything is working fine, and repeat this each time you make any changes.

To see a video tutorial on how to download and import an automation file into your Bet Angel please see this link
https://www.youtube.com/watch?v=g7Im4pj683g
You do not have the required permissions to view the files attached to this post.
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

TIP

I have left the ticked at the bottom of the stored value tab so that you can see it write the number of selections to the log so you can confirm its working correctly. In the image below the file was applied to the 'Italian Serie A Outright Winner' market and you can see the final stored value named 'Selections' = 16
Which of course means there are 16 selections in this market.

Log.jpg


To keep your log tidy you can untick this box on both rules as shown below and it will not impact upon how the rules works.

SV Tab.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
firlandsfarm
Posts: 2688
Joined: Sat May 03, 2014 8:20 am

Hi Dallas, thanks for this … how can I now tie this into the Stall Draw? … I want to ID the outside Stall.
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

firlandsfarm wrote:
Tue Apr 14, 2020 4:06 am
Hi Dallas, thanks for this … how can I now tie this into the Stall Draw? … I want to ID the outside Stall.
I'll need to have a think on what may be the best way as I don't think theres going to be any straight forward ways as the highest stall draw number won't necessarily be the number of runners.
Off the top of my head your going to need individual rules with a stall draw condition equal to 'X' to store values on each
User avatar
firlandsfarm
Posts: 2688
Joined: Sat May 03, 2014 8:20 am

Dallas wrote:
Tue Apr 14, 2020 12:43 pm
firlandsfarm wrote:
Tue Apr 14, 2020 4:06 am
Hi Dallas, thanks for this … how can I now tie this into the Stall Draw? … I want to ID the outside Stall.
I'll need to have a think on what may be the best way as I don't think theres going to be any straight forward ways as the highest stall draw number won't necessarily be the number of runners.
Off the top of my head your going to need individual rules with a stall draw condition equal to 'X' to store values on each
Yeah, hadn't thought of that. Initially it's for the Dogs so a non-runner will leave an empty stall, yes. Could it be approached the other way round ... ID the runner with the highest Stall No.?
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

firlandsfarm wrote:
Tue Apr 14, 2020 6:30 pm
Dallas wrote:
Tue Apr 14, 2020 12:43 pm
firlandsfarm wrote:
Tue Apr 14, 2020 4:06 am
Hi Dallas, thanks for this … how can I now tie this into the Stall Draw? … I want to ID the outside Stall.
I'll need to have a think on what may be the best way as I don't think theres going to be any straight forward ways as the highest stall draw number won't necessarily be the number of runners.
Off the top of my head your going to need individual rules with a stall draw condition equal to 'X' to store values on each
Yeah, hadn't thought of that. Initially it's for the Dogs so a non-runner will leave an empty stall, yes. Could it be approached the other way round ... ID the runner with the highest Stall No.?
If its only for dogs there going to be more options as there are only 6 stalls and 6 always on the outside (unless they differ overseas in Aus etc as I've never checked these).
But in terms ok UK dogs could you just apply a rule to Betfair row 6 (which would also be stall 6)
Then have another rule armed 0.5 secs later applied to Betfair row 5 with a 'Number of place bet triggers condition' equal to 0
ie, that rule will only trigger if the first hasn't

Then do the same for row 4
User avatar
firlandsfarm
Posts: 2688
Joined: Sat May 03, 2014 8:20 am

Dallas wrote:
Tue Apr 14, 2020 7:40 pm
If its only for dogs there going to be more options as there are only 6 stalls and 6 always on the outside (unless they differ overseas in Aus etc as I've never checked these).
But in terms ok UK dogs could you just apply a rule to Betfair row 6 (which would also be stall 6)
Then have another rule armed 0.5 secs later applied to Betfair row 5 with a 'Number of place bet triggers condition' equal to 0
ie, that rule will only trigger if the first hasn't

Then do the same for row 4
Yes that would work to ID the 'most outside' trap with a runner but then my request goes the other way round … how do I check if it's the Fav (BTW in AUS it's 8 dogs to a standard race and I assume trap 8 is again the outside one). I'm looking to ID if the Fav. is in the outside trap. I thought this is no problem … sort in order of favouritism, count the number of selections and set a condition where the trap number for the Fav = the number of runners only to hit a wall when I found the Trap condition requires an entered number and not a SV.

So it seems my problem is I can find the Fav but don't know if it's in the outside trap or I can find the outside trap but don't know if it's the Fav! Is there a way I can sort in Betfair/trap order, somehow 'mark' the selection in the outside trap with a Signal or SV and then re-sort in order of favouritism and see if the favourite has the mark? I've not done a re-sort before but I'm thinking the logic is good! :)
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

firlandsfarm wrote:
Tue Apr 14, 2020 9:29 pm
Dallas wrote:
Tue Apr 14, 2020 7:40 pm
If its only for dogs there going to be more options as there are only 6 stalls and 6 always on the outside (unless they differ overseas in Aus etc as I've never checked these).
But in terms ok UK dogs could you just apply a rule to Betfair row 6 (which would also be stall 6)
Then have another rule armed 0.5 secs later applied to Betfair row 5 with a 'Number of place bet triggers condition' equal to 0
ie, that rule will only trigger if the first hasn't

Then do the same for row 4
Yes that would work to ID the 'most outside' trap with a runner but then my request goes the other way round … how do I check if it's the Fav (BTW in AUS it's 8 dogs to a standard race and I assume trap 8 is again the outside one). I'm looking to ID if the Fav. is in the outside trap. I thought this is no problem … sort in order of favouritism, count the number of selections and set a condition where the trap number for the Fav = the number of runners only to hit a wall when I found the Trap condition requires an entered number and not a SV.

So it seems my problem is I can find the Fav but don't know if it's in the outside trap or I can find the outside trap but don't know if it's the Fav! Is there a way I can sort in Betfair/trap order, somehow 'mark' the selection in the outside trap with a Signal or SV and then re-sort in order of favouritism and see if the favourite has the mark? I've not done a re-sort before but I'm thinking the logic is good! :)
If its just the fav in the outside trap your after i think you may have over thought it.

If you create a rule applied to row 8 (or 6 for UK) then add a 'Relative Odds Condition'
The selections price
is less than
the price
of Betfair order of favourtism 2
minus 1 tick

Thats basically testing the runner in row 8 is priced less than the 2nd fav, ie, its the favourite
User avatar
firlandsfarm
Posts: 2688
Joined: Sat May 03, 2014 8:20 am

Dallas wrote:
Tue Apr 14, 2020 9:38 pm
If its just the fav in the outside trap your after i think you may have over thought it.

If you create a rule applied to row 8 (or 6 for UK) then add a 'Relative Odds Condition'
The selections price
is less than
the price
of Betfair order of favourtism 2
minus 1 tick

Thats basically testing the runner in row 8 is priced less than the 2nd fav, ie, its the favourite
Hey that sounds good Dallas, I must admit I wasn't aware of the dropdown for selecting the comparative runner. Thanks. But I would still like to think how I can do similar for horses where the outside stall is variable or where the outside dog is a non-runner. I will try my last suggestion this morning in Practice Mode with some Aussie races.
User avatar
tootatoota
Posts: 56
Joined: Fri Apr 17, 2020 2:33 am

Hi,
In Australian dog racing we have 8 runners.
If i wanted to lay say Box4(Trap4) which is also Number 4,how do i do that given that if there is a scratching Number 4 is now in row 3?
I cant manually do this as it is part of Automation.
Is there a way of backing or laying numbers ?
Someone said excel attachment but my capabilities dont go that far and given i would like to use SP its hard.
My bot is set up but the number thing has me Bamboozled.
Thanks Toota
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

firlandsfarm wrote:
Tue Apr 14, 2020 9:29 pm
I assume trap 8 is again the outside one.
....some races are run on a straight track. 8 is technically the outside but I guess so is trap 1. I don't watch many but I've seen them a few times so I'm not sure what proportion are like that. Looks fun though, never realised there were so many routes from A to B with dogs weaving around. Maybe the easiest filter for those might be on distance as I don't suppose many places have a piece of land big enough to go far or want to go and fetch a dog back from 1/2 mile away. I don't know what they do to dogs in Aus but they just seem like they try harder, maybe they're not raced as often?
Anbell
Posts: 2004
Joined: Fri Apr 05, 2019 2:31 am

tootatoota wrote:
Mon Aug 10, 2020 11:57 pm
Hi,
In Australian dog racing we have 8 runners.
If i wanted to lay say Box4(Trap4) which is also Number 4,how do i do that given that if there is a scratching Number 4 is now in row 3?
I cant manually do this as it is part of Automation.
Is there a way of backing or laying numbers ?
Someone said excel attachment but my capabilities dont go that far and given i would like to use SP its hard.
My bot is set up but the number thing has me Bamboozled.
Thanks Toota
Im not sure you can do it precisely but if you use Number of Selections= 8 you'd get pretty close most of the time:
> it'd save you from backing the wrong animal if 1, 2 or 3 were scratched and not replaced
> it won't back 4 in that case either (no bet)
> if 4 was scratched and replaced with 9 or 10, it'd falsely back those.
User avatar
firlandsfarm
Posts: 2688
Joined: Sat May 03, 2014 8:20 am

ShaunWhite wrote:
Tue Aug 11, 2020 1:04 am
... I don't know what they do to dogs in Aus but they just seem like they try harder, maybe they're not raced as often?
Maybe they keep them hungry before a race! :lol: And never seen a straight run dog race, interesting you say they weave around you would think they would all run straight to the hare, bunch up and trip each other over! :)
User avatar
beermonsterman
Posts: 522
Joined: Sun Dec 25, 2016 2:47 pm
Location: Birmingham UK

Hi thank you for this
Can anyone help me to use this file with my horse racing automation rules
what I want is a rule that will stop my bet being placed if their is a non runner in that race
I need it to watch the market for the duration of the day
I'm struggling to integrate this file as I dont have a clue when it comes to stored values
I do understand signals
Would I need to set a signal set condition or a stored value condition ?
also how would i adjust the time frame to watch from first thing in the morning before I go to work as I set and forget every morning
I had my automation trigger multiple bets into the market the other day because of non runners when the runners moved in x amount of ticks due to 3 non runners that caused 2 other runners to have met my conditions and triggered 2 back bets when it was set to fire just once so when the time time frame condition was met I had 2 selections meeting my criteria instead of 1
for now i have adjusted my bet trigger times to separate the selections by 2 seconds this way it cannot fire to bets at the same time
Any input would be greatly appreciated

Also one more thing can any help with this next problem I came across



03/01/2021 13:07:59: [G_Auto] : Automation Signal for Mount Mayon: bet3 = 1
03/01/2021 13:07:59: [G_Auto] : Alert: bet [ Mount Mayon ]
03/01/2021 13:07:59: [G_Auto] : Unable to place back bet on Mount Mayon at 8. The order cannot be processed as the market is suspended.
03/01/2021 13:08:00: Guardian has detected that the market is suspended
03/01/2021 13:08:01: Guardian has detected that the market is in-play
03/01/2021 13:08:01: Guardian has detected that the market is now unsuspended
03/01/2021 13:09:45: Guardian has detected that the market is suspended

Thank you
User avatar
beermonsterman
Posts: 522
Joined: Sun Dec 25, 2016 2:47 pm
Location: Birmingham UK

beermonsterman wrote:
Mon Jan 11, 2021 7:40 am
Hi thank you for this
Can anyone help me to use this file with my horse racing automation rules
what I want is a rule that will stop my bet being placed if their is a non runner in that race
I need it to watch the market for the duration of the day
I'm struggling to integrate this file as I dont have a clue when it comes to stored values
I do understand signals
Would I need to set a signal set condition or a stored value condition ?
also how would i adjust the time frame to watch from first thing in the morning before I go to work as I set and forget every morning
I had my automation trigger multiple bets into the market the other day because of non runners when the runners moved in x amount of ticks due to 3 non runners that caused 2 other runners to have met my conditions and triggered 2 back bets when it was set to fire just once so when the time time frame condition was met I had 2 selections meeting my criteria instead of 1
for now i have adjusted my bet trigger times to separate the selections by 2 seconds this way it cannot fire to bets at the same time
Any input would be greatly appreciated

Also one more thing can any help with this next problem I came across



03/01/2021 13:07:59: [G_Auto] : Automation Signal for Mount Mayon: bet3 = 1
03/01/2021 13:07:59: [G_Auto] : Alert: bet [ Mount Mayon ]
03/01/2021 13:07:59: [G_Auto] : Unable to place back bet on Mount Mayon at 8. The order cannot be processed as the market is suspended.
03/01/2021 13:08:00: Guardian has detected that the market is suspended
03/01/2021 13:08:01: Guardian has detected that the market is in-play
03/01/2021 13:08:01: Guardian has detected that the market is now unsuspended
03/01/2021 13:09:45: Guardian has detected that the market is suspended

Thank you
Can anyone help me on this please i have an automation rule that places bets for me if certain conditions are met but i need it to not fire if their is a non runner that affects the price ei causes fav 2nd fav 3rd fav to steam in as this triggers my bets and which i really wish it wouldn't thank you for reading
Post Reply

Return to “Bet Angel Automation - General”