"ANY Selection" (General tab of Automation Dialog Box)

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
User avatar
firlandsfarm
Posts: 2720
Joined: Sat May 03, 2014 8:20 am

I am confused what this option does! I cannot find any reference to it in the Manual nor if I search for "ANY selection". I think it can help me but can't get it to do as I want.

I want to place a bet on any and all runners in a race that meet certain criteria. Such as at ticks over/under current market price, where odds are over/under a set level. I can achieve it by setting up a rule for every runner but that's longwinded, untidy and not good coding practice. By "Any" does it mean "any one selection", seemingly selected at random? If I set it to trigger once it only fires one bet on one runner and if I set it to fire say 10 times it may choose a different runner on subsequent firings but it may choose a runner that had a bet from a previous triggering!

I have tried to control it with Conditions such as Number of (Un)matched but that hasn't given me a clear picture, it seems to sometimes restrict firing on other runners if one runner meets the Condition.

Where can I find a full explanation of this option?
User avatar
Dallas
Posts: 22726
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

It does what it says on the tin and applies the rule to 'ANY' selection that meet the conditions set, if you want it to trigger on several selections then you need to ensure its set to trigger enough times.
Conditions like 'number of matched / unmatched and place bets triggers' can be used to control how many times per selection it will place bets on.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Picture it as looping through all the selections in Befair screen order (is that order right Dallas?), applying the rule to each in turn. 'ANY' can also be thought of as 'ALL' or 'EACH'.

To control it, you could set a Selection Signal (maybe called 'TimesFired' ) to control how many times it will be triggered for each selection. Increment it in the rule (signals only change value when the rule 'works') and have it as condtion for when it cycles round again. I find Selection Signals and Market Signals very useful for that type of thing.
User avatar
firlandsfarm
Posts: 2720
Joined: Sat May 03, 2014 8:20 am

I tried all of that Dallas and it didn't do as it said on the tin, as I explained in my original question! I found it seemed to apply a bets condition to the group and not to each runner individually so sometimes once it triggered on one selection it didn't trigger on others and if I increased the number of firings it would duplicate an earlier firing! Maybe a proper section in the manual to explain it with examples would help ... is there any reason why it's not in the manual?
weemac
Posts: 1240
Joined: Mon Sep 16, 2013 8:16 pm

After lots of trialing and frustration I gave up using 'Any' months ago because of the same problems firlandsfarm describes. It would bet on only one runner, apparently at random, either betting only the favourite, or else one other random runner, often repeated on that same runner at the next cycle, even though half a dozen runners qualified.
User avatar
Dallas
Posts: 22726
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

firlandsfarm wrote:
Tue Feb 21, 2017 8:59 pm
I tried all of that Dallas and it didn't do as it said on the tin, as I explained in my original question! I found it seemed to apply a bets condition to the group and not to each runner individually so sometimes once it triggered on one selection it didn't trigger on others and if I increased the number of firings it would duplicate an earlier firing! Maybe a proper section in the manual to explain it with examples would help ... is there any reason why it's not in the manual?
If you want to post the rule i can take a look and advise the changes to be made, as per my first reply it will be down to the conditions you have set/not set. Many of the example rules already on here as well as my own rules use applies to 'ANY' and they all trigger as they should.

There is nothing that could really be put in the manual thats not self explanitory as you look at it ie,
Applied to Betfair row index 1 - means the selection in Betfair row 1
Applied to Betfair in order of favourtism 2 - means the selection that is 2nd favourite
and so on..
User avatar
firlandsfarm
Posts: 2720
Joined: Sat May 03, 2014 8:20 am

Thanks for the input Dallas and Shaun, I appreciate you discussing this here.

Dallas I can't agree your comment ...
"There is nothing that could really be put in the manual thats not self explanitory as you look at it ie,
Applied to Betfair row index 1 - means the selection in Betfair row 1
Applied to Betfair in order of favourtism 2 - means the selection that is 2nd favourite
and so on.."
... all of that section is self explanatory except the "ANY" command as is evidenced by the difficulty in using it! I think there would be some value in giving some examples in the Manual of how it is intended to be used. I appreciate what you say it does (should do) but it appears from weemac's comment I'm not the only one having trouble.

I will send my code later after I have tidied it up (I've tried many different settings so need to haul it back to some form of original form).

Shaun, I can picture what I expect it to do and am fully familiar with For/Next, While/Wend etc. looping but what I cannot picture is how it does it! For example, how do I set a Condition or Signal to apply to an unidentifiable random runner? And as weemac confirms simply increasing the number of firings only encourages the apparent randomness of the bet allocations!

All I want to do is to fire a back bet, with a Book% stake, into the market for every runner who's odds are below X just before the off (say 3 mins) and Keep the bet in play if unmatched. ("X" is still subject to research to find an optimum level. :) )
User avatar
jimibt
Posts: 3675
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

I've tackled this issue before when using ANY.. by assigning a signal value to the bet once it has been placed. I then on subsequent iterations of the logic, determine whether such signal for the selection already exists and ignore that selection if this is the case.

this approach may or may not be appropriate for your scenario. I don't know the inner workings of BA, but my gut feel tells me that Any Selection DOES NOT loop round all the selections as an atomic process. Im my opinion, it takes the first matching selection on each re-arm and applies the logic to that. this is why i add a signal to a selection that has already been visited and processed.

hope this helps
User avatar
Dallas
Posts: 22726
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

firlandsfarm wrote:
Wed Feb 22, 2017 1:09 pm
All I want to do is to fire a back bet, with a Book% stake, into the market for every runner who's odds are below X just before the off (say 3 mins) and Keep the bet in play if unmatched. ("X" is still subject to research to find an optimum level. :) )
Here you go, for this all thats needed is a 'Number of Place bets condition' on selection is equal to 0

Its fully tested and working and is set to back every runner below 10.0 at 5 mins before the off once each using the Book% stake - just need to add a 'Keep All bets' rule to it and trigger just before the off
You do not have the required permissions to view the files attached to this post.
User avatar
Dallas
Posts: 22726
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

jimibt wrote:
Wed Feb 22, 2017 1:17 pm
I don't know the inner workings of BA, but my gut feel tells me that Any Selection DOES NOT loop round all the selections as an atomic process. Im my opinion, it takes the first matching selection on each re-arm and applies the logic to that. this is why i add a signal to a selection that has already been visited and processed.

hope this helps
Thats right, if you have 10 selections and a rule applied to ANY with a simple back bet on its first trigger it will hit row 1 once its rearmed it will hit row 1 again unless something tells it to ignore this then it will move onto the next.
User avatar
firlandsfarm
Posts: 2720
Joined: Sat May 03, 2014 8:20 am

Thanks for the rules file, I'll import it later. But it seems from Jimibt's comment there is some confusion over what the ANY function does. I am inclined to agree with him that it stops at the first runner that matches the Conditions until re-fired. I experimented with that and using Matched bets and Unmatched bets Conditions on re-firing but couldn't get it to work ... I'll see if/what I missed when I open your file. Thanks again.
User avatar
Dallas
Posts: 22726
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

firlandsfarm wrote:
Wed Feb 22, 2017 1:36 pm
Thanks for the rules file, I'll import it later. But it seems from Jimibt's comment there is some confusion over what the ANY function does. I am inclined to agree with him that it stops at the first runner that matches the Conditions until re-fired. I experimented with that and using Matched bets and Unmatched bets Conditions on re-firing but couldn't get it to work ... I'll see if/what I missed when I open your file. Thanks again.
What Jim has said is right (see my response below his) if you want a rule to fire simultaneously on multiple selections then you need a seperate rule for each one - when using ANY it needs to re-arm before triggering on the next
User avatar
jimibt
Posts: 3675
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

In my opinion, Any selection is widely misunderstood and perhaps clarity in the help file would be useful for others. I for one never expected Any to cover multiple selections in a single re-arm but can see why it could be construed that way.

Of course the new feature that I'm starting a rumour about (Each Selection) is the one that you are after really :D
User avatar
firlandsfarm
Posts: 2720
Joined: Sat May 03, 2014 8:20 am

Sorry Dallas but I cannot comment just yet ... I'm getting a message "Unable to open the Automation Rules File: ShortBookRules" (I renamed it when saving.) Can't see there's much I can do wrong ... click Import ... find the file ... click "Open" (seems OK, no error message there) ... click to select rule (again, seems OK, no error message there) ... click to ""Edit rules file" and up pops the error message :( I downloaded the file to my Documents folder, is there a specific location I should move it to?
User avatar
jimibt
Posts: 3675
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

i think the issue is related to the fact that Dallas probably saved the rule inside the newest version of BA. That rules file has a version number of 7.0, whereas, the current live version of BA has the rules version at v6.0.

viewtopic.php?f=46&t=13532

Either Dallas can resave the rule in the current prod version of BA, or you would need to upgrade your version to the latest and all would be fine.
Post Reply

Return to “Bet Angel - Automation”