Help with automation rule for checking a stored value of the 'Win Status' next to a selections name

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
ronniechew
Posts: 8
Joined: Mon Jan 04, 2016 3:25 pm

Hi all,
I'm having difficulty getting my head around an automation rule, I was wondering if someone could maybe assist me with this please?

I already have a text comparison condition set up with a list of runners to which when a certain number of conditions are met a bet is placed on one or more of the runners.

My queston is, I want to allow the rule to stop placing bets once a winner is identified from the list.
So if I have say 25 runners in the text comparison list, the rule triggers (based on conditions being met) on 7 of them, and they all lose. The 8th runner that meets the conditions, wins, so I want the rule to stop and place no further bets.


I am trying to set and check a stored value of the 'Win Status' next to a selections name then if one has the status 'Winner' next to it use that as a condition to stop further rules triggering.

I already run the rule Display Names of the Winner.baf which has SV as text 'win status' for each selection named 'race_result'

But I can't see how to check my list of runners to check if one was the winner and then allow the trigger rule to stop any further bets

thank you
sniffer66
Posts: 1824
Joined: Thu May 02, 2019 8:37 am

Just off the top of my head.
When you place the bet on a selection, also create an SV for that selection, call it, say, "BetPlaced". Once the market is closed and you have the win status, have an EVERY rule that runs when market is closed where if your text value is "winner" and "BetPlaced" are both true then set a BA level SV called "Stop Betting" = 1. Then in your bet rule don't bet if BA level SV "Stop Betting" = 1

Make sure to set the BA level "Stop Betting" back to 0 as the first rule, so its unset for the next day when you apply the baf to new markets
User avatar
Dallas
Posts: 23596
Joined: Sun Aug 09, 2015 10:57 pm

Give this a try, its an example I never got around to posting to stop after a winner, and more or less what Sniffer66 has just given instructions for
I've made a slight edit from the version I had and put a 'Text Comparison' for you to add your list of names to each day (you should have this same list of names in your betting file on the rule that places the bets)

The only other edit to you betting file also on the rule that places the bet would be to add a 'Stored Value Condition to test;
The stored value for Bet Angel named 'stop_remaining_bets'
Is set with a Value
Stop Bets after a Winner.baf

BTW; As i've just made that small edit make sure you are also using the latest version V1.62.0 to be able to install and use the file
viewtopic.php?t=29255
You do not have the required permissions to view the files attached to this post.
ronniechew
Posts: 8
Joined: Mon Jan 04, 2016 3:25 pm

Thank you all, much appreciate your help with this,
Dallas, thank you for the file, ran it on the last few dog races for the night and it worked, I'll test it more tomorrow

quick question, when a winner is reached, and the bets stop triggering, if I delete the list and add a new list and restart the process, will the rule reset itself to allow the process to start again?

a seperate question that I have been wanting to ask for a while, I also run the Greyhound information rule to give me (amonst other things) a running P/L. How can I rest this to £0.00 at the begining of each day without closing and restarting betangel?

Thanks again
User avatar
Dallas
Posts: 23596
Joined: Sun Aug 09, 2015 10:57 pm

ronniechew wrote:
Mon Aug 05, 2024 9:59 pm

quick question, when a winner is reached, and the bets stop triggering, if I delete the list and add a new list and restart the process, will the rule reset itself to allow the process to start again?

Thanks again
If you create a new automation file with a 'Set/Modify Stored Value' rule, and on the stored value tab clear the names of the stored values named
'stop_remaining_bets' and 'result'
you'll then be able to paste in a new list of names and re-use the rule

ronniechew wrote:
Mon Aug 05, 2024 9:59 pm

a seperate question that I have been wanting to ask for a while, I also run the Greyhound information rule to give me (amonst other things) a running P/L. How can I rest this to £0.00 at the begining of each day without closing and restarting betangel?

Thanks again
Similar to above but clear the stored values named 'market_profit' and 'total_profit'
On this one you'll also need to copy the 'Set intial stored value' rule from the P/L file and place it below the reset stored value so that it then resets your P/L's back to £0

Or you could configure just one Stored Value to clear all names, and that would reset them for both for you


When you create the new file or files they are need to be always armed and trigger just 1 time. It only needs to be applied to one market (doesn't matter which), as soon as that market is refreshed it will trigger the rules and reset everything.
ronniechew
Posts: 8
Joined: Mon Jan 04, 2016 3:25 pm

Hi Dallas,
I've had a proper play around with the rule today, for some reason my bet rule is triggering on the market fine but not stopping when a winner comes. The log has Store Value (Shared) for Bet Angel: stop_remaining_bets = 1. It maybe the edit to the betting file I made, The stored value condition test part, is it a 'stored value condition or a 'stored value condition set' that I need to apply?

I currently have in my bet rule conditions (amongst other conditions including odds conditions) as per screen shot
Screenshot 08-06-2024 16.29.48.png
Also i overlooked something in that the bet rule has odd conditions and the 'stop bets after a winner' rule doesn't, so I am assuming the latter will trigger the SV at any odds and set the value =1 even though the bet rule hasn't found the winner at the odds set?

So would I set the stop bets rule with the same odds? I 'm thinking yes, but I am unsure as I haven't told it when to look at these odds, as with the bet rule it will trigger 5 seconds before the start if the runner is at these odds.
You do not have the required permissions to view the files attached to this post.
User avatar
Dallas
Posts: 23596
Joined: Sun Aug 09, 2015 10:57 pm

ronniechew wrote:
Tue Aug 06, 2024 4:55 pm
Hi Dallas,
I've had a proper play around with the rule today, for some reason my bet rule is triggering on the market fine but not stopping when a winner comes. The log has Store Value (Shared) for Bet Angel: stop_remaining_bets = 1. It maybe the edit to the betting file I made, The stored value condition test part, is it a 'stored value condition or a 'stored value condition set' that I need to apply?

I currently have in my bet rule conditions (amongst other conditions including odds conditions) as per screen shot
Screenshot 08-06-2024 16.29.48.png

Also i overlooked something in that the bet rule has odd conditions and the 'stop bets after a winner' rule doesn't, so I am assuming the latter will trigger the SV at any odds and set the value =1 even though the bet rule hasn't found the winner at the odds set?

So would I set the stop bets rule with the same odds? I 'm thinking yes, but I am unsure as I haven't told it when to look at these odds, as with the bet rule it will trigger 5 seconds before the start if the runner is at these odds.
On your image of the 'Stored Value Set' condition you would use the option 'NOT set with a value'
It will then let the rule trigger up until the Stored value is set

Or you could use a 'Stored Value' condition, and set it to test:
the Stored Value for Bet Angel named 'stop_remaining_bets'
Is Equal to
An Entered Amount 1

Either of those would work and do the same thing


Regarding the second question about the odds, just so I know I understand correctly
You have odds conditions against the selection names but if one of those doesn't meet your odds conditions but goes on to win, currently the SV will stop further bets - but you only want it to trigger if an actual bet was placed?
ronniechew
Posts: 8
Joined: Mon Jan 04, 2016 3:25 pm

Dallas wrote:
Tue Aug 06, 2024 5:20 pm
ronniechew wrote:
Tue Aug 06, 2024 4:55 pm
Hi Dallas,
I've had a proper play around with the rule today, for some reason my bet rule is triggering on the market fine but not stopping when a winner comes. The log has Store Value (Shared) for Bet Angel: stop_remaining_bets = 1. It maybe the edit to the betting file I made, The stored value condition test part, is it a 'stored value condition or a 'stored value condition set' that I need to apply?

I currently have in my bet rule conditions (amongst other conditions including odds conditions) as per screen shot
Screenshot 08-06-2024 16.29.48.png

Also i overlooked something in that the bet rule has odd conditions and the 'stop bets after a winner' rule doesn't, so I am assuming the latter will trigger the SV at any odds and set the value =1 even though the bet rule hasn't found the winner at the odds set?

So would I set the stop bets rule with the same odds? I 'm thinking yes, but I am unsure as I haven't told it when to look at these odds, as with the bet rule it will trigger 5 seconds before the start if the runner is at these odds.
On your image of the 'Stored Value Set' condition you would use the option 'NOT set with a value'
It will then let the rule trigger up until the Stored value is set

Or you could use a 'Stored Value' condition, and set it to test:
the Stored Value for Bet Angel named 'stop_remaining_bets'
Is Equal to
An Entered Amount 1

Either of those would work and do the same thing


Regarding the second question about the odds, just so I know I understand correctly
You have odds conditions against the selection names but if one of those doesn't meet your odds conditions but goes on to win, currently the SV will stop further bets - but you only want it to trigger if an actual bet was placed?
Yes thats correct, I only want the bet to trigger between these odds on these names, and for the bet rule to stop betting when a winner within the list at these odds is met. The SV rule I believe is looking at the whole list, at all odds. I overlooked this yesterday when I was describing what I was trying to achieve.

I
User avatar
Dallas
Posts: 23596
Joined: Sun Aug 09, 2015 10:57 pm

ronniechew wrote:
Tue Aug 06, 2024 5:54 pm
Dallas wrote:
Tue Aug 06, 2024 5:20 pm
ronniechew wrote:
Tue Aug 06, 2024 4:55 pm
Hi Dallas,
I've had a proper play around with the rule today, for some reason my bet rule is triggering on the market fine but not stopping when a winner comes. The log has Store Value (Shared) for Bet Angel: stop_remaining_bets = 1. It maybe the edit to the betting file I made, The stored value condition test part, is it a 'stored value condition or a 'stored value condition set' that I need to apply?

I currently have in my bet rule conditions (amongst other conditions including odds conditions) as per screen shot
Screenshot 08-06-2024 16.29.48.png

Also i overlooked something in that the bet rule has odd conditions and the 'stop bets after a winner' rule doesn't, so I am assuming the latter will trigger the SV at any odds and set the value =1 even though the bet rule hasn't found the winner at the odds set?

So would I set the stop bets rule with the same odds? I 'm thinking yes, but I am unsure as I haven't told it when to look at these odds, as with the bet rule it will trigger 5 seconds before the start if the runner is at these odds.
On your image of the 'Stored Value Set' condition you would use the option 'NOT set with a value'
It will then let the rule trigger up until the Stored value is set

Or you could use a 'Stored Value' condition, and set it to test:
the Stored Value for Bet Angel named 'stop_remaining_bets'
Is Equal to
An Entered Amount 1

Either of those would work and do the same thing


Regarding the second question about the odds, just so I know I understand correctly
You have odds conditions against the selection names but if one of those doesn't meet your odds conditions but goes on to win, currently the SV will stop further bets - but you only want it to trigger if an actual bet was placed?
Yes thats correct, I only want the bet to trigger between these odds on these names, and for the bet rule to stop betting when a winner within the list at these odds is met. The SV rule I believe is looking at the whole list, at all odds. I overlooked this yesterday when I was describing what I was trying to achieve.

I
OK, got you, and yes it was currently set up assuming there would be a bet on all selections, so it just needs to recognise a bet is placed on a runner

I'll ponder over it and try and get back with some instructions in the morning, trying to step through the logic in my head and they may be a few ways of doing it
ronniechew
Posts: 8
Joined: Mon Jan 04, 2016 3:25 pm

Dallas wrote:
Tue Aug 06, 2024 8:59 am
ronniechew wrote:
Mon Aug 05, 2024 9:59 pm

quick question, when a winner is reached, and the bets stop triggering, if I delete the list and add a new list and restart the process, will the rule reset itself to allow the process to start again?

Thanks again
If you create a new automation file with a 'Set/Modify Stored Value' rule, and on the stored value tab clear the names of the stored values named
'stop_remaining_bets' and 'result'
you'll then be able to paste in a new list of names and re-use the rule

ronniechew wrote:
Mon Aug 05, 2024 9:59 pm

a seperate question that I have been wanting to ask for a while, I also run the Greyhound information rule to give me (amonst other things) a running P/L. How can I rest this to £0.00 at the begining of each day without closing and restarting betangel?

Thanks again
Similar to above but clear the stored values named 'market_profit' and 'total_profit'
On this one you'll also need to copy the 'Set intial stored value' rule from the P/L file and place it below the reset stored value so that it then resets your P/L's back to £0

Or you could configure just one Stored Value to clear all names, and that would reset them for both for you


When you create the new file or files they are need to be always armed and trigger just 1 time. It only needs to be applied to one market (doesn't matter which), as soon as that market is refreshed it will trigger the rules and reset everything.
Thank you, that would be great, you are a star.

Thinking about it logically, the SV would need to be triggered by the bet rule conditions and then a stop SV would be in turn triggered by this first SV being set, but I'm not sure if this then creates some circular reference issue

on the subject of clearing stored values, I have set this up but can't get it to clear, is there a sample template .baf that I can edit or follow? Also I can't locate the 'Set initial stored value' rule from the P/L file, and when you say place it below, not sure what you mean?
User avatar
Dallas
Posts: 23596
Joined: Sun Aug 09, 2015 10:57 pm

Dallas wrote:
Tue Aug 06, 2024 6:13 pm
ronniechew wrote:
Tue Aug 06, 2024 5:54 pm
Dallas wrote:
Tue Aug 06, 2024 5:20 pm


On your image of the 'Stored Value Set' condition you would use the option 'NOT set with a value'
It will then let the rule trigger up until the Stored value is set

Or you could use a 'Stored Value' condition, and set it to test:
the Stored Value for Bet Angel named 'stop_remaining_bets'
Is Equal to
An Entered Amount 1

Either of those would work and do the same thing


Regarding the second question about the odds, just so I know I understand correctly
You have odds conditions against the selection names but if one of those doesn't meet your odds conditions but goes on to win, currently the SV will stop further bets - but you only want it to trigger if an actual bet was placed?
Yes thats correct, I only want the bet to trigger between these odds on these names, and for the bet rule to stop betting when a winner within the list at these odds is met. The SV rule I believe is looking at the whole list, at all odds. I overlooked this yesterday when I was describing what I was trying to achieve.

I
OK, got you, and yes it was currently set up assuming there would be a bet on all selections, so it just needs to recognise a bet is placed on a runner

I'll ponder over it and try and get back with some instructions in the morning, trying to step through the logic in my head and they may be a few ways of doing it
This would be the most easiest way of doing it, I ended up creating the rule rather than just stepping through the logic in my head so it's quicker/easier to just upload that than type the instructions.
1, Rule File.baf

All you need to do is use the copy option in the rules editor
viewtopic.php?t=13568

and copy the rule in that file to the bottom of your current betting rule, what it basically does is look for the SV 'stop_remaining_bets' to be set and if it is and there are no matched bets on the market (ie, a named horse was the winner but didn't meet your price criteria), it clears the SV allowing it to work again the next race

and copy
You do not have the required permissions to view the files attached to this post.
User avatar
Dallas
Posts: 23596
Joined: Sun Aug 09, 2015 10:57 pm

ronniechew wrote:
Tue Aug 06, 2024 7:25 pm

on the subject of clearing stored values, I have set this up but can't get it to clear, is there a sample template .baf that I can edit or follow? Also I can't locate the 'Set initial stored value' rule from the P/L file, and when you say place it below, not sure what you mean?
Is it the following P/L file you are using and if so are the stored value names still the same or have you edited either?
viewtopic.php?t=25455

If not that file which one are you using?
ronniechew
Posts: 8
Joined: Mon Jan 04, 2016 3:25 pm

Dallas wrote:
Wed Aug 07, 2024 11:46 am
ronniechew wrote:
Tue Aug 06, 2024 7:25 pm

on the subject of clearing stored values, I have set this up but can't get it to clear, is there a sample template .baf that I can edit or follow? Also I can't locate the 'Set initial stored value' rule from the P/L file, and when you say place it below, not sure what you mean?
Is it the following P/L file you are using and if so are the stored value names still the same or have you edited either?
viewtopic.php?t=25455

If not that file which one are you using?
Hi Dallas, amazing thank you ever so much for doing that, I will test it and see how it does.

The P/L file is from this rule, not edited any names, just upload and use as it came.
Greyhound Information.baf
You do not have the required permissions to view the files attached to this post.
User avatar
Dallas
Posts: 23596
Joined: Sun Aug 09, 2015 10:57 pm

ronniechew wrote:
Wed Aug 07, 2024 2:47 pm
Dallas wrote:
Wed Aug 07, 2024 11:46 am
ronniechew wrote:
Tue Aug 06, 2024 7:25 pm

on the subject of clearing stored values, I have set this up but can't get it to clear, is there a sample template .baf that I can edit or follow? Also I can't locate the 'Set initial stored value' rule from the P/L file, and when you say place it below, not sure what you mean?
Is it the following P/L file you are using and if so are the stored value names still the same or have you edited either?
viewtopic.php?t=25455

If not that file which one are you using?
Hi Dallas, amazing thank you ever so much for doing that, I will test it and see how it does.

The P/L file is from this rule, not edited any names, just upload and use as it came.
Greyhound Information.baf
Ah ok I thought it was another P/L file you were using, the names are probably similar but with this you need to set it to clear
the stored value named 'Market_Profit' for 'Current Selection'
the stored value named 'Total_Profit' for 'Bet Angel'
the stored value named 'Market_P&L' for the 'Market'

The rule which sets the initial value to £0 is two rules above the one which sets those Stored Values
ronniechew
Posts: 8
Joined: Mon Jan 04, 2016 3:25 pm

Sorted the clear P&L SV's thank you

Do I need to still run a clear SV for the stop bets SV? I see it already has a clear SV in the rule you sent across?

If this has it built in, when does it clear the SV, when a new list is imported? And how do I know the SV has been cleared?

with the P&L I can see the total P&L go back to £0 but there is nothing visual for the stop bet cleared SV

hope that makes sense

thank you
Post Reply

Return to “Bet Angel - Automation”