Greyhounds - Sometimes the rules won't fully complete unless I manually double click the row in Guardian

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
smgreyuk
Posts: 98
Joined: Tue Jul 30, 2024 4:20 pm

I have a strange situation for Greyhounds whereby in terms of conditions, nothing is stopping the rest of the rules from triggering (each condition is satisfied) yet it will only do this if I manually double click the row in Guardian.

I have noticed this only seems to happen if the markets (Win and Place) close a bit later than say 3 minutes from the start time (I think)
Screenshot 2025-04-11 131243.png
The screenshot shows the time I had to intervene and double click the row, as soon as I did, it performed the rest of the rules in the red box.

Is there something I can set/do to not have to manually intervene, basically as soon as the conditions are met, trigger the rules automatically?

I have a feeling that it may be something to do with the refresh settings perhaps.

If so, mine are currently as follows:

Refresh interval: 20 milliseconds
Restrict Refresh is turned off

Or do the rules all need "rearm after refresh" to be ticked?
You do not have the required permissions to view the files attached to this post.
User avatar
jamesedwards
Posts: 3919
Joined: Wed Nov 21, 2018 6:16 pm

I think once Guardian marks a market as closed it stops refreshing that market. Therefore you need to make sure all your P&L tracking rules complete in the same single refresh cycle where the market is closed. You might need to rejig your rules order a bit.
smgreyuk
Posts: 98
Joined: Tue Jul 30, 2024 4:20 pm

Thanks for the reply James.

The problem is my final P/L calculation is depending on getting the sub P/Ls from both the Win and Place market.

I think what's happening then, based on what you are saying, is (when this issue happens) the Win Market's refresh cycle is ready but the Place Market hasn't come back with it's own P/L.

When the Place Market's P/L is finally calculated the "boat has been missed" for the "Calculate Final P/L" rule on the Win Market File (this rule needs the Place Market P/L in order to calculate the final P/L).

In terms of a solution I am thinking of either moving the "Calculate Final P/L" rule to the Place Market

OR

Having two "Calculate Final P/L" rules - one on each file, if one cycle is missed, surely the cycle of the other rule is still active, and with all event SVs being shared, it should still be able to automatically update the Final P/L.

Unless there is an easier way? :-)
User avatar
jamesedwards
Posts: 3919
Joined: Wed Nov 21, 2018 6:16 pm

I'm thinking perhaps create a running P&L at event level for each race, that updates twice, once at the final refresh cycle of the WIN market, and once at the final refresh cycle of the PLACE market.

eg [event profit @ event level] = [event profit @ event level] + [market profit]. Note you will need to set the [event profit @ event level] = 0 when the rule first runs to make this work.
smgreyuk
Posts: 98
Joined: Tue Jul 30, 2024 4:20 pm

Thanks jamesedwards,

Yes I had the two event P/Ls already set up.

Now I have a Calculate Final P/L on both files, just tested it on the last race and the Win Market file triggered the Calculate Final P/L, which is good news

Now it said it triggered it twice this time on the Win Market file and had zero triggers for the Place Market file (not sure about this).

I just need a situation whereby the markets cycles close at different times (possibly 5 seconds or more apart perhaps) for the true test
smgreyuk
Posts: 98
Joined: Tue Jul 30, 2024 4:20 pm

Just had another race whereby I had to double click to get it to calculate final P/L:
Screenshot 2025-04-11 164228.png
So having the "Calculate Final P/L" rule on both files hasn't solved the problem.

The "Calculate Final P/L" rule hasn't ran once on any of the races for the Place Market.

Here are the rule files if you want to have a look yourself jamesedwards
XX - Back the Fave.baf
- This set to the Win Market


YY - Lay the Fave.baf
- This is set to the Place Market

Remember most of the time (I would say 90% of races) this all works correctly, whereby the Calculate Final P/L works correctly on the Win Market File.
You do not have the required permissions to view the files attached to this post.
smgreyuk
Posts: 98
Joined: Tue Jul 30, 2024 4:20 pm

So the Win Market waits for the Place Market to do its calculation and waits too long and the cycle is gone.

So I have an idea.

Both Win and Place Market do their own thing in their own time without any dependency on each other and they will eventually come to their own Event P/L figures.

I create a third file to do the calculations which is always armed, that then does the calculations on its own.

I'll give this go and report back
User avatar
jamesedwards
Posts: 3919
Joined: Wed Nov 21, 2018 6:16 pm

jamesedwards wrote:
Fri Apr 11, 2025 2:21 pm
I'm thinking perhaps create a running P&L at event level for each race, that updates twice, once at the final refresh cycle of the WIN market, and once at the final refresh cycle of the PLACE market.

eg [event profit @ event level] = [event profit @ event level] + [market profit]. Note you will need to set the [event profit @ event level] = 0 when the rule first runs to make this work.
This method is probably simpler.
smgreyuk
Posts: 98
Joined: Tue Jul 30, 2024 4:20 pm

Yeah, that method is my method from the start, having two event P/Ls like you said and combining them to a final P/L

10% of the time it doesn't work, so having a dedicated 3rd rule to look after the calculation side of things and letting the two main rules not fall over each other should hopefully be what I need.

I'll give this a go a bit later on today.
User avatar
jamesedwards
Posts: 3919
Joined: Wed Nov 21, 2018 6:16 pm

My best guess is that this is likely your problem, because sometimes WM P/L or PM P/L will still be unknown when Guardian does it's final refresh of that market.
z125.JPG
Try doing it the way I suggested:
Create an SV @ Event level to = 0
On the WIN market make the SV @ Event level = SV @ Event level + WM P/L. This will add the WM P/L to the SV @ Event level when the WIN market closes.
On the PLACE market make the SV @ Event level = SV @ Event level + PM P/L. This will add the PM P/L to the SV @ Event level when the PLACE market closes.

So once both markets have closed the SV @ Event level will equal the sum of the WIN and PLACE market's P/Ls, and it doesn't matter which market Guardian registers as closed first. It will work either way.
You do not have the required permissions to view the files attached to this post.
smgreyuk
Posts: 98
Joined: Tue Jul 30, 2024 4:20 pm

Ah yes, got you now!

Sorry jamesedwards, I was working earlier on and you were only getting about 60% of my focus, I know exactly where you are coming from now and you have saved me a lot more work.

Thank you so much :-)
Post Reply

Return to “Bet Angel - Automation”