Avoiding multiple liability when re-applying a rule

We were all new to Bet Angel once. Ask any question you like here and fellow forum members promise not to laugh. Betfair trading made simple.
Post Reply
fishtownraider
Posts: 50
Joined: Mon Feb 20, 2023 3:05 pm

I have a rule that will place a lay order for a fixed liability if the selection reaches a predetermined price, with a condition that unmatched bets must = 0 to trigger. But when the BF fixture list updates in Guardian, I have to find and select only the newly added games before re-applying the rule, otherwise my liability on already-placed lays is doubled (i.e. it places a second lay order, even though there is an unmatched bet in place). How can I avoid this, so that I can just select the whole list and apply, and the have the games with lays already in place ignored, please?
You do not have the required permissions to view the files attached to this post.
fishtownraider
Posts: 50
Joined: Mon Feb 20, 2023 3:05 pm

Relatedly/alternatively, is it possible to automate the application of a rule as soon as a fixture appears in the markets list?
Anbell
Posts: 2124
Joined: Fri Apr 05, 2019 2:31 am

fishtownraider wrote:
Sun May 19, 2024 5:49 pm
I have a rule that will place a lay order for a fixed liability if the selection reaches a predetermined price, with a condition that unmatched bets must = 0 to trigger. But when the BF fixture list updates in Guardian, I have to find and select only the newly added games before re-applying the rule, otherwise my liability on already-placed lays is doubled (i.e. it places a second lay order, even though there is an unmatched bet in place). How can I avoid this, so that I can just select the whole list and apply, and the have the games with lays already in place ignored, please?
It shouldnt place a second bet if you have "unmatched bets must = 0" set up, but until you get that sorted, when you add new events to guardian, you can sort by the Automation Rule Column which makes it easy to add the bot to the new events.
User avatar
jamesedwards
Posts: 2474
Joined: Wed Nov 21, 2018 6:16 pm

Something wrong with your rule somewhere.

If you post it here then someone will have a look at it and hopefully spot the issue.
fishtownraider
Posts: 50
Joined: Mon Feb 20, 2023 3:05 pm

Anbell wrote:
Mon May 20, 2024 12:37 am
fishtownraider wrote:
Sun May 19, 2024 5:49 pm
I have a rule that will place a lay order for a fixed liability if the selection reaches a predetermined price, with a condition that unmatched bets must = 0 to trigger. But when the BF fixture list updates in Guardian, I have to find and select only the newly added games before re-applying the rule, otherwise my liability on already-placed lays is doubled (i.e. it places a second lay order, even though there is an unmatched bet in place). How can I avoid this, so that I can just select the whole list and apply, and the have the games with lays already in place ignored, please?
It shouldnt place a second bet if you have "unmatched bets must = 0" set up, but until you get that sorted, when you add new events to guardian, you can sort by the Automation Rule Column which makes it easy to add the bot to the new events.
Thanks, Anbell. To do that, I think I need to do two things: (1) save the list of markets when Guardian closes and (2) tick the 'Save Automations' box in List > Options for Save Markets. (2) is easy enough, but is there a 'Save Markets List on Exit' setting anywhere? The list was unpopulated when I opened Guardian this morning, although I wasn't prompted to save it when I closed BA yesterday. (I used to get a prompt; perhaps I've switched something off.)

Have you any idea how I can get rid of the persistent Bakes FC fixture from 15 September? It's not a great problem, but it offends my sense of tidiness (aka OCD :lol: )
You do not have the required permissions to view the files attached to this post.
fishtownraider
Posts: 50
Joined: Mon Feb 20, 2023 3:05 pm

jamesedwards wrote:
Mon May 20, 2024 11:55 am
Something wrong with your rule somewhere.

If you post it here then someone will have a look at it and hopefully spot the issue.
Thanks, James

I've just tried a reapplication and it's looking OK now (at least, the orders I've sampled on BF are showing the correct liability), so I probably just cocked something up earlier. I won't waste anyone's time posting the rule unless it happens again, but thanks for the advice.
fishtownraider
Posts: 50
Joined: Mon Feb 20, 2023 3:05 pm

OK. I still can't get this to work, so I'm asking for some help. I have included an 'unmatched bets = 0' condition, but when I run my 'Set-up Trading' shortcut, which applies the rule to all markets, I end up with two bets on all those that have alredy been processed. What is wrong, please?
You do not have the required permissions to view the files attached to this post.
User avatar
jamesedwards
Posts: 2474
Joined: Wed Nov 21, 2018 6:16 pm

fishtownraider wrote:
Tue May 21, 2024 3:20 pm
OK. I still can't get this to work, so I'm asking for some help. I have included an 'unmatched bets = 0' condition, but when I run my 'Set-up Trading' shortcut, which applies the rule to all markets, I end up with two bets on all those that have alredy been processed. What is wrong, please?
What does your 'set-up trading' shortcut do? If it removes then re-adds existing markets from Guardian then it will take Guardian a full cycle to register that an unmatched bet is already sitting on that market. Better to leave existing markets loaded and just add new ones. Or wait for a full cycle after loading markets before setting the rulesfile.
fishtownraider
Posts: 50
Joined: Mon Feb 20, 2023 3:05 pm

jamesedwards wrote:
Tue May 21, 2024 3:39 pm
fishtownraider wrote:
Tue May 21, 2024 3:20 pm
OK. I still can't get this to work, so I'm asking for some help. I have included an 'unmatched bets = 0' condition, but when I run my 'Set-up Trading' shortcut, which applies the rule to all markets, I end up with two bets on all those that have alredy been processed. What is wrong, please?
What does your 'set-up trading' shortcut do? If it removes then re-adds existing markets from Guardian then it will take Guardian a full cycle to register that an unmatched bet is already sitting on that market. Better to leave existing markets loaded and just add new ones. Or wait for a full cycle after loading markets before setting the rulesfile.
Thanks, James. The shortcut selects the markets and then adds and applies the rule, so I guess I need to insert a delay between those two steps. There doesn't seem to be an option for doing that in the shortcut editor, though.
fishtownraider
Posts: 50
Joined: Mon Feb 20, 2023 3:05 pm

Perhaps it will work if I don't clear the list on the coupon, although I think PW said it was good practice to do so.
You do not have the required permissions to view the files attached to this post.
User avatar
jamesedwards
Posts: 2474
Joined: Wed Nov 21, 2018 6:16 pm

fishtownraider wrote:
Tue May 21, 2024 4:31 pm
Perhaps it will work if I don't clear the list on the coupon, although I think PW said it was good practice to do so.
Yes, that is 100% your problem. Either select 'dont clear', or wait for a full cycle after loading the markets before applying your rulesfile.
fishtownraider
Posts: 50
Joined: Mon Feb 20, 2023 3:05 pm

jamesedwards wrote:
Tue May 21, 2024 4:35 pm
fishtownraider wrote:
Tue May 21, 2024 4:31 pm
Perhaps it will work if I don't clear the list on the coupon, although I think PW said it was good practice to do so.
Yes, that is 100% your problem. Either select 'dont clear', or wait for a full cycle after loading the markets before applying your rulesfile.
Thanks again. I can change to 'don't clear' and add a couple more conditions to remove closed and suspended markets, but I can't see a way to select only those markets to which my rules file hasn't been applied.

I've attempted to get round it for now by adding a rule that removes all existing bets and then applying it before reapplying the original lay rules file. Hopefully, the automation will allow the remove file to run its course before applying the lay rule. It all seems a bit clunky, though. It seems to me that it shouldn't be hard to include a delay between actions, like you can on any script, but I can't see an option for it anywhere. I'll put a request in.
You do not have the required permissions to view the files attached to this post.
User avatar
jamesedwards
Posts: 2474
Joined: Wed Nov 21, 2018 6:16 pm

fishtownraider wrote:
Tue May 21, 2024 6:39 pm
jamesedwards wrote:
Tue May 21, 2024 4:35 pm
fishtownraider wrote:
Tue May 21, 2024 4:31 pm
Perhaps it will work if I don't clear the list on the coupon, although I think PW said it was good practice to do so.
Yes, that is 100% your problem. Either select 'dont clear', or wait for a full cycle after loading the markets before applying your rulesfile.
Thanks again. I can change to 'don't clear' and add a couple more conditions to remove closed and suspended markets, but I can't see a way to select only those markets to which my rules file hasn't been applied.

I've attempted to get round it for now by adding a rule that removes all existing bets and then applying it before reapplying the original lay rules file. Hopefully, the automation will allow the remove file to run its course before applying the lay rule. It all seems a bit clunky, though. It seems to me that it shouldn't be hard to include a delay between actions, like you can on any script, but I can't see an option for it anywhere. I'll put a request in.
Most likely, all you needed to do was change it to 'dont clear'.

Before, you were clearing and then re-adding the market therefore purging the Guardian bet history. This lead to the rule triggering a new bet before Guardian got around to working out there was already an unmatched bet in place.
fishtownraider
Posts: 50
Joined: Mon Feb 20, 2023 3:05 pm

OK, I'll give that a go, then and see what happens. Thanks, James.
Anbell
Posts: 2124
Joined: Fri Apr 05, 2019 2:31 am

fishtownraider wrote:
Mon May 20, 2024 12:21 pm
Anbell wrote:
Mon May 20, 2024 12:37 am
fishtownraider wrote:
Sun May 19, 2024 5:49 pm
I have a rule that will place a lay order for a fixed liability if the selection reaches a predetermined price, with a condition that unmatched bets must = 0 to trigger. But when the BF fixture list updates in Guardian, I have to find and select only the newly added games before re-applying the rule, otherwise my liability on already-placed lays is doubled (i.e. it places a second lay order, even though there is an unmatched bet in place). How can I avoid this, so that I can just select the whole list and apply, and the have the games with lays already in place ignored, please?
It shouldnt place a second bet if you have "unmatched bets must = 0" set up, but until you get that sorted, when you add new events to guardian, you can sort by the Automation Rule Column which makes it easy to add the bot to the new events.
Thanks, Anbell. To do that, I think I need to do two things: (1) save the list of markets when Guardian closes and (2) tick the 'Save Automations' box in List > Options for Save Markets. (2) is easy enough, but is there a 'Save Markets List on Exit' setting anywhere? The list was unpopulated when I opened Guardian this morning, although I wasn't prompted to save it when I closed BA yesterday. (I used to get a prompt; perhaps I've switched something off.)

Have you any idea how I can get rid of the persistent Bakes FC fixture from 15 September? It's not a great problem, but it offends my sense of tidiness (aka OCD :lol: )
image_2024-05-22_140341109.png
https://www.betangel.com/support/ai-support-center/
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Bet Angel for newbies / Getting started”