Custom Ranking of Selection Weight

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
steveosb
Posts: 10
Joined: Tue Apr 23, 2024 3:17 pm

I'm having a little trouble with getting the custom ranking to work correctly when applying it to selection weights. I'm storing the value 'Weight' for each selection before a race from the Store Value Text option (which works fine as I get the correct weight for each selection in pounds) but when I run the Update ranking rule and applying into the to 'Weight' Stored value (and then saving the rank position as an SV), it does rank the weights, but the order is incorrect in the rank stored value - some of the weights are in the correct descending order, but then others may be out of place, so that if you look at the weights and follow the ranking order, you might find the value of the weights going up and down when they should just be going down.

Has anyone experienced this before? Is there a setting that I may have missed? Any help would be very much appreciated!
steveosb
Posts: 10
Joined: Tue Apr 23, 2024 3:17 pm

Just for extra info. The selections are being ranked by Betfair row order - not according to weight. Is there any reason why the custom order by weight might not be working? I've considered the possibility that it is because the weight is being stored as text (because weight comes under the store value as text option) and have added an extra step to save the stored value for weight (from the text option) as a regular stored value and rounding to the nearest whole number to see if that worked - but without any luck. It seems odd as the weight is showing in pounds (eg 138) rather and 10st 1b etc so I do not understand why the ranking does not seem to work.

If anyone can give me any pointers of what is going wrong I'd appreciate it.
Simone
Posts: 13
Joined: Fri Jul 18, 2025 9:47 am

Hello,

I've run into a similar issue before. When the stored value is saved as text Bet Angel will rank the selections alphabetically rather than numerically, so something like 9st 10lb will come before 10st 1lb. To get the custom ranking to behave you need to save the weight as a number. You can do this with an extra set/modify stored value rule – strip out the "st" and "lb" and convert the result into pounds or kilos. Once you've got a pure number in a numeric SV, set the update ranking rule to use that stored value and sort descending.

Also make sure the ranking rule triggers after all weights have been stored. If the ranking runs while some runners still have a default value of zero it can shuffle them around unpredictably.

That solved it for me. Hope it helps.
User avatar
Dabbla
Posts: 868
Joined: Wed Apr 15, 2009 1:50 pm

Try this >
(A) W_TEST.baf
I looks like it was not working correctly because its saved as a text. Not sure why your set up did not work.
You do not have the required permissions to view the files attached to this post.
User avatar
Dublin_Flyer
Posts: 875
Joined: Sat Feb 11, 2012 10:39 am

Bet Angel AI says jockeys claims are not taken into account for storing a weight so that could be something to take into account depending on what you're doing.
Top weight with a 7lb claiming jockey might only be 4th or 5th in weights when the 7lb is deducted.
steveosb
Posts: 10
Joined: Tue Apr 23, 2024 3:17 pm

Many thanks @Dabbla - that automation file fixed it - you're a life saver. Thank you to everyone else you replied too. Ideally I'd be ranking horses according to their Official Rating, but since that does not seem to be an option at the moment, I thought I rank by weight as an alternative - I'm just wanting to put the selections into an order which reflects what the officials think the ability of the horse is. If anyone knows whether getting the OR into BA in the future is on the cards I'd be interested to hear! Cheers.

@Simone - when I store the weights I get the weight in pounds rather than Stone and Pounds (ie I get 138 not 10st 1lb etc). I'm not sure how I did that as there does not seem to be a setting (that I can find) which toggles between the to formats for weights.
User avatar
Dublin_Flyer
Posts: 875
Joined: Sat Feb 11, 2012 10:39 am

Just wanted to throw in something I noticed with this while I was experimenting with Dabblas tester and modifying it to find clear top weights.

From Newcastle 16.15 Friday 5th
05/12/2025 16:00:00: [G_Auto 2] : Store Value (Shared) for Senor Campanaro: WEIGHT2 = 127 (9st 1lb) Correct
05/12/2025 16:00:00: [G_Auto 2] : Store Value (Shared) for Jackabi: WEIGHT2 = 135 (9st 9lb) Incorrect
05/12/2025 16:00:00: [G_Auto 2] : Store Value (Shared) for Smartanck: WEIGHT2 = 131 (9st 5lb) Correct
05/12/2025 16:00:00: [G_Auto 2] : Store Value (Shared) for Panthere Noir: WEIGHT2 = 127 (9st 1lb) Correct
05/12/2025 16:00:00: [G_Auto 2] : Store Value (Shared) for Senor Campanaro: WEIGHT_RANK = 4
05/12/2025 16:00:00: [G_Auto 2] : Store Value (Shared) for Jackabi: WEIGHT_RANK = 1
05/12/2025 16:00:00: [G_Auto 2] : Store Value (Shared) for Smartanck: WEIGHT_RANK = 2
05/12/2025 16:00:00: [G_Auto 2] : Store Value (Shared) for Panthere Noir: WEIGHT_RANK = 3
05/12/2025 16:00:00: [G_Auto 2] : Store Value (Shared) for Jackabi: Clear Top = 1

Jackabi had a 5lb claimer riding but the 5lb was added to the weight for some reason (not Dabblas doing, his work is perfect). He was due to carry 9st 4lb (130lb) or 8st 13lb (125lb) if you take the jockeys allowance into account. From being ranked as clear top weight, he was actually clear bottom weight counting the allowance.

Similarly in the Sedgefield 3.20
05/12/2025 15:05:00: [G_Auto 2] : Store Value (Shared) for Trigg: WEIGHT2 = 163 (11st 9lb) Incorrect
05/12/2025 15:05:00: [G_Auto 2] : Store Value (Shared) for Grazeon Sunshine: WEIGHT2 = 156 (11st 2lb) Correct
05/12/2025 15:05:00: [G_Auto 2] : Store Value (Shared) for Caspada: WEIGHT2 = 156 (11st 2lb) Incorrect
05/12/2025 15:05:00: [G_Auto 2] : Store Value (Shared) for Belle Brise: WEIGHT2 = 149 (10st 9lb) Incorrect

05/12/2025 15:05:00: [G_Auto 2] : Store Value (Shared) for Art Dancer: WEIGHT2 = 156 (11st 2lb) Correct
05/12/2025 15:05:00: [G_Auto 2] : Store Value (Shared) for R Krista: WEIGHT2 = 149 (10st 9lb) Correct
05/12/2025 15:05:00: [G_Auto 2] : Store Value (Shared) for Trigg: WEIGHT_RANK = 1
05/12/2025 15:05:00: [G_Auto 2] : Store Value (Shared) for Grazeon Sunshine: WEIGHT_RANK = 4
05/12/2025 15:05:00: [G_Auto 2] : Store Value (Shared) for Caspada: WEIGHT_RANK = 3
05/12/2025 15:05:00: [G_Auto 2] : Store Value (Shared) for Belle Brise: WEIGHT_RANK = 6
05/12/2025 15:05:00: [G_Auto 2] : Store Value (Shared) for Art Dancer: WEIGHT_RANK = 2
05/12/2025 15:05:00: [G_Auto 2] : Store Value (Shared) for R Krista: WEIGHT_RANK = 5
05/12/2025 15:05:00: [G_Auto 2] : Store Value (Shared) for Trigg: Clear Top = 1

The 3 incorrect weights were due to claimers of 7, 5 and 3lb being added to the riding weights respectively. Where Trigg was ranked as clear top weight, there was no clear top weight as Art Dancer and Grazeon were both carrying 156lb (11st 2lb)

I don't know if it's a one off thing or a glitch in the technistuff between BF and BA but it's something to take into account if using Dabblas example for ranking by weight.
As is, you'd need to have a WEIGHT3 stored value of WEIGHT2 minus the jockeys claim to get the actual declared weight and use that figure for your ranking, or double the jockeys claim and subtract it from WEIGHT2 to get the actual riding weight including jockeys allowance.
Post Reply

Return to “Bet Angel - Automation”