Backing runner with lowest odds in a range

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
scorchedrail
Posts: 10
Joined: Sun Feb 28, 2021 4:12 pm

I'm trying to back the runner with the lowest odds in a range of odds. Example : I am selecting and odds range of $4 to $6 and there are 3 runners with various odds within that range ie. 4.2, 5.1 and 5.4. I want a bet to trigger on the runner paying 4.2.

I've tried several things from basic to complicated stored value lists but I can only seem to get the bet to trigger on runners in odds ranges in betfair order.

Any help would be really appreciated.
User avatar
jamesedwards
Posts: 4366
Joined: Wed Nov 21, 2018 6:16 pm

Set a rule that triggers a bet in order of favouritism (1) with conditions that odds are between 4 and 6 and SV "placed" has not been set. Set a stored value on this trigger that "placed" = 1.
Set a second rule that triggers a bet in order of favouritism (2) with conditions that odds are between 4 and 6 and SV "placed" has not been set. Set a stored value on this trigger that "placed" = 1.
Set a third rule that triggers a bet in order of favouritism (3) with conditions that odds are between 4 and 6 and SV "placed" has not been set. Set a stored value on this trigger that "placed" = 1.
etc
etc
scorchedrail
Posts: 10
Joined: Sun Feb 28, 2021 4:12 pm

I might be reading it wrong but I don't understand how that solves the issue. Order of favouritism does not seem to work with odds ranges. It defaults to betfair order when placing the bet.

Maybe I don't understand your explanation. Can you elaborate?

It's ok if I'm only betting on one odds range of 4 to 6. But if I'm setting up rules for 4 to 6 then say.... 10 to 12. So I only want to bet on the favourite in each of those odds ranges. Then it seems to have issues.

I appreciate your reply but I'm still a bit confused. Any chance of writing an example rules file to bet on one runner with the lowest odds between odds ranges 4 to 6 and 10 to 12? Or maybe a more detailed explanation?

I will admit that my brain and betfair automation are not overly compatible. I've written many automation files and some quite complicated but sometimes simple things within automation rules seem counter intuitive to me.

I appreciate you taking the time to help. The way I read what you wrote is - I set set a bet trigger that doesn't bet but instead it sets a stored value and increments bet placed to 1 for each runner in the odds range. Again - I'm probably reading it wrong and if I'm reading it right I don't get how that solves the issue. I'm sure it does. I just don't see how. Further help? If you have time. Please.
User avatar
jamesedwards
Posts: 4366
Joined: Wed Nov 21, 2018 6:16 pm

This tests the first 5 horses in order of favouritism and places a back bet at 2.0 when it gets to the first horse between odds of 4.0 and 6.0. Once successful it sets a stored value "placed" for the market which prevents any further bets being triggered.
test.baf
You do not have the required permissions to view the files attached to this post.
scorchedrail
Posts: 10
Joined: Sun Feb 28, 2021 4:12 pm

Awesome. Thank you. I'll take a look at that file.
scorchedrail
Posts: 10
Joined: Sun Feb 28, 2021 4:12 pm

Nope. Can't test it. It was created with a different version of bet angel and isn't compatible. I'm running the latest version.
User avatar
jamesedwards
Posts: 4366
Joined: Wed Nov 21, 2018 6:16 pm

scorchedrail wrote:
Sun Aug 11, 2024 2:07 am
Nope. Can't test it. It was created with a different version of bet angel and isn't compatible. I'm running the latest version.
viewtopic.php?t=29255
scorchedrail
Posts: 10
Joined: Sun Feb 28, 2021 4:12 pm

Thanks. I thought I was running the latest version but I wasn't.

I had a look at the rules file. I only want to back the favourite in an odds range so I don't understand why it's checking 2nd, 3rd, 4th etc fave in the odds band an incrementing the stored value.

It's also only betting if the stored value of placed bet is 0. That would only work with one odds range. It will not bet again on the next odds range.

I'm trying to bet on the runner with the lowest odds in various odds ranges. eg. 2 to 4, 6 to 7 and 10 to 12. Back one runner in each of those odds ranges being the runner with the lowest odds then back nothing else. If we stop betting when placed bet for the market doesn't equal 0 it will only place one bet. So it will only bet on one odds range.

I can get it to bet in each odds range but when I use sort by favouritism it doesn't do that. It bets in betfair order instead. That's the main issue I'm having.
sniffer66
Posts: 1824
Joined: Thu May 02, 2019 8:37 am

Sounds to me like a job for custom ranking. Create a different custom ranking for each price range, using a stored value of the current Back price called BackPriceRange1 (For Custom Ranking 1), BackPriceRange2 (For Custom Ranking 2) etc, where you only assign the stored values for runners in each range, then update each custom ranking by the stored value and it will return the lowest priced runner in each range

e,g. Custom Ranking 1 is for your 4.6 to 6.0 range. Store an SV called BackPriceRange4-6 with the back price to each horse in that price range, using an EVERY stored value set rule, filtered to only set the SV if Back price is between 4.0 and 6.0.
Update your Custom Ranking 1, sorted by BackPriceRange4-6, and Rank 1 in your custom ranking is the lowest price horse in that range.
Then your bet rule for that range would be an EVERY rule with the condition that the runner is Rank 1 in Custom Ranking 1

I'm not 100% sure what happens in custom ranking by SV if the SV doesn't exist for a runner. If you find they are still included in the custom ranking then just set any runner out of the range to an SV value of 9999, and they will always appear last
User avatar
jamesedwards
Posts: 4366
Joined: Wed Nov 21, 2018 6:16 pm

scorchedrail wrote:
Mon Aug 12, 2024 3:41 am
Thanks. I thought I was running the latest version but I wasn't.

I had a look at the rules file. I only want to back the favourite in an odds range so I don't understand why it's checking 2nd, 3rd, 4th etc fave in the odds band an incrementing the stored value.

It's also only betting if the stored value of placed bet is 0. That would only work with one odds range. It will not bet again on the next odds range.

I'm trying to bet on the runner with the lowest odds in various odds ranges. eg. 2 to 4, 6 to 7 and 10 to 12. Back one runner in each of those odds ranges being the runner with the lowest odds then back nothing else. If we stop betting when placed bet for the market doesn't equal 0 it will only place one bet. So it will only bet on one odds range.

I can get it to bet in each odds range but when I use sort by favouritism it doesn't do that. It bets in betfair order instead. That's the main issue I'm having.
Just use a different stored value for each odds range.

The stored value stops a second horse from being backed within the relevant odds range.

This file still only covers the first five horses by price. You might need to add rules for 6th, 7th, 8th fav etc in to make sure your higher odds bands are always covered.

test.baf
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Bet Angel - Automation”