You need to change column E in your CSV to be 'SS'.
Currently you are storing the value against the market, it needs to be at selection level.
Like this
1
*,*,Mukhtalif,*,SS,Qualifier,1.0
Selecting 6 Horses
Hey TommyC,
My first race and it has left out a horse name, so after staring at it all for a bit I realised a flaw.
The horse's name is scraped with an apostrophe (Poet's Dawn) , but it wasn't used for it's name in Bet Angel (Poets Dawn) so it looks like it has ignored the horse altogether and done 5 of the 6.
Without me having to go and manipulate more python code, have you come across this before and if so, do you have any workarounds?
My first race and it has left out a horse name, so after staring at it all for a bit I realised a flaw.
The horse's name is scraped with an apostrophe (Poet's Dawn) , but it wasn't used for it's name in Bet Angel (Poets Dawn) so it looks like it has ignored the horse altogether and done 5 of the 6.
Without me having to go and manipulate more python code, have you come across this before and if so, do you have any workarounds?
- jamesedwards
- Posts: 4484
- Joined: Wed Nov 21, 2018 6:16 pm
You have to remove the apostrophe. Betfair don't use them but Betdaq do.smgreyuk wrote: ↑Fri Sep 26, 2025 2:27 pmHey TommyC,
My first race and it has left out a horse name, so after staring at it all for a bit I realised a flaw.
The horse's name is scraped with an apostrophe (Poet's Dawn) , but it wasn't used for it's name in Bet Angel (Poets Dawn) so it looks like it has ignored the horse altogether and done 5 of the 6.
Without me having to go and manipulate more python code, have you come across this before and if so, do you have any workarounds?
In Excel use =SUBSTITUTE(C4,"'","")
Still not out of the woods yet.
To recap I want to:
- Count how many horses are in the race (to rule out Non Runners) - if it's less than 6 as in there's a horse in that CSV that is now a non runner for this race, the race is a not bet
- Put in a Book% Condition based on the sum of the 6 selected. If the total book% of the 6 exceeds 80%, the race is a no bet.
One or possibly both seem to be going wrong.
It seems to be running through each horse in the logs and yet still assigning a 6 to Counter. Correct for the amount of horse names in the file with regards to the race but why include Fairydale ? This horse isn't in the CSV? (Maybe that's just a side effect of using the EVERY selection and Counter is still doing the job it needs to do)
Or is it? As only 3 of the 6 end up being backed (but possibly not the fault of the counter variable, maybe?)
With regards to the Book% Condition, I have it set to less than 80% but I think I know what it's doing wrong - I think it is totalling the book% total in increments with each horse and then when it hits the limit it then cuts the rest off in the list (I could be wrong there but that's my best guess as to why it only backs 3 of the 6 horses) - I would want it to total the book% of the entire 6, see that it's over 80% and not back any of them.
I'll attach the .baf if you could take a look please tommyc when you get a second, I may well be missing something obvious. (I tried attaching the .CSV but it won't let me, just to say 100% Fairydale is not in the CSV)
To recap I want to:
- Count how many horses are in the race (to rule out Non Runners) - if it's less than 6 as in there's a horse in that CSV that is now a non runner for this race, the race is a not bet
- Put in a Book% Condition based on the sum of the 6 selected. If the total book% of the 6 exceeds 80%, the race is a no bet.
One or possibly both seem to be going wrong.
It seems to be running through each horse in the logs and yet still assigning a 6 to Counter. Correct for the amount of horse names in the file with regards to the race but why include Fairydale ? This horse isn't in the CSV? (Maybe that's just a side effect of using the EVERY selection and Counter is still doing the job it needs to do)
Or is it? As only 3 of the 6 end up being backed (but possibly not the fault of the counter variable, maybe?)
With regards to the Book% Condition, I have it set to less than 80% but I think I know what it's doing wrong - I think it is totalling the book% total in increments with each horse and then when it hits the limit it then cuts the rest off in the list (I could be wrong there but that's my best guess as to why it only backs 3 of the 6 horses) - I would want it to total the book% of the entire 6, see that it's over 80% and not back any of them.
I'll attach the .baf if you could take a look please tommyc when you get a second, I may well be missing something obvious. (I tried attaching the .CSV but it won't let me, just to say 100% Fairydale is not in the CSV)
You do not have the required permissions to view the files attached to this post.
Here is the whole log:
27/09/2025 14:14:31: [G_Auto 1] : Store Value (Shared) for Supreme Clarets: Qualifier = 1
27/09/2025 14:14:31: [G_Auto 1] : Store Value (Shared) for Assaranca: Qualifier = 1
27/09/2025 14:14:31: [G_Auto 1] : Store Value (Shared) for Conjecture: Qualifier = 1
27/09/2025 14:14:31: [G_Auto 1] : Store Value (Shared) for Bearin Up: Qualifier = 1
27/09/2025 14:14:31: [G_Auto 1] : Store Value (Shared) for Renovatio Angel: Qualifier = 1
27/09/2025 14:14:31: [G_Auto 1] : Store Value (Shared) for Zooter: Qualifier = 1
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Zooter: Counter = 6
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Renovatio Angel: Counter = 6
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Assaranca: Counter = 6
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Bearin Up: Counter = 6
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Conjecture: Counter = 6
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Supreme Clarets: Counter = 6
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Fairydale: Counter = 6
27/09/2025 14:14:50: [G_Auto 1] : Store Value (Shared) for Zooter: Book% = 38.168
27/09/2025 14:14:50: [G_Auto 1] : Store (range calc) Value (Shared) for Zooter: Sum of Book% = 38.168
27/09/2025 14:14:50: [G_Auto 1] : Store Value (Shared) for Renovatio Angel: Book% = 21.739
27/09/2025 14:14:50: [G_Auto 1] : Store (range calc) Value (Shared) for Renovatio Angel: Sum of Book% = 59.907
27/09/2025 14:14:50: [G_Auto 1] : Store Value (Shared) for Assaranca: Book% = 12.821
27/09/2025 14:14:50: [G_Auto 1] : Store (range calc) Value (Shared) for Assaranca: Sum of Book% = 72.728
27/09/2025 14:14:50: [G_Auto 1] : Store Value (Shared) for Bearin Up: Book% = 10.87
27/09/2025 14:14:50: [G_Auto 1] : Store (range calc) Value (Shared) for Bearin Up: Sum of Book% = 83.597
27/09/2025 14:14:50: [G_Auto 1] : Store Value (Shared) for Conjecture: Book% = 10
27/09/2025 14:14:50: [G_Auto 1] : Store (range calc) Value (Shared) for Conjecture: Sum of Book% = 93.597
27/09/2025 14:14:50: [G_Auto 1] : Store Value (Shared) for Supreme Clarets: Book% = 4.167
27/09/2025 14:14:50: [G_Auto 1] : Store (range calc) Value (Shared) for Supreme Clarets: Sum of Book% = 97.764
27/09/2025 14:14:55: [G_Auto 1] : £ 3.94 Back bet placed on Zooter at 2.54. Fully matched at 2.54. Ref: 10000
27/09/2025 14:14:55: [G_Auto 1] : £ 1.28 Back bet placed on Assaranca at 7.8. Fully matched at 7.8. Ref: 10001
27/09/2025 14:14:55: [G_Auto 1] : £ 2.17 Back bet placed on Renovatio Angel at 4.6. Fully matched at 4.6. Ref: 10002
27/09/2025 14:15:29: Guardian has detected that the market is suspended
27/09/2025 14:15:31: Guardian has detected that the market is in-play
27/09/2025 14:15:32: Guardian has detected that the market is now unsuspended
27/09/2025 14:17:10: Guardian has detected that the market is suspended
27/09/2025 14:14:31: [G_Auto 1] : Store Value (Shared) for Supreme Clarets: Qualifier = 1
27/09/2025 14:14:31: [G_Auto 1] : Store Value (Shared) for Assaranca: Qualifier = 1
27/09/2025 14:14:31: [G_Auto 1] : Store Value (Shared) for Conjecture: Qualifier = 1
27/09/2025 14:14:31: [G_Auto 1] : Store Value (Shared) for Bearin Up: Qualifier = 1
27/09/2025 14:14:31: [G_Auto 1] : Store Value (Shared) for Renovatio Angel: Qualifier = 1
27/09/2025 14:14:31: [G_Auto 1] : Store Value (Shared) for Zooter: Qualifier = 1
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Zooter: Counter = 6
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Renovatio Angel: Counter = 6
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Assaranca: Counter = 6
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Bearin Up: Counter = 6
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Conjecture: Counter = 6
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Supreme Clarets: Counter = 6
27/09/2025 14:14:36: [G_Auto 1] : Store (range calc) Value (Shared) for Fairydale: Counter = 6
27/09/2025 14:14:50: [G_Auto 1] : Store Value (Shared) for Zooter: Book% = 38.168
27/09/2025 14:14:50: [G_Auto 1] : Store (range calc) Value (Shared) for Zooter: Sum of Book% = 38.168
27/09/2025 14:14:50: [G_Auto 1] : Store Value (Shared) for Renovatio Angel: Book% = 21.739
27/09/2025 14:14:50: [G_Auto 1] : Store (range calc) Value (Shared) for Renovatio Angel: Sum of Book% = 59.907
27/09/2025 14:14:50: [G_Auto 1] : Store Value (Shared) for Assaranca: Book% = 12.821
27/09/2025 14:14:50: [G_Auto 1] : Store (range calc) Value (Shared) for Assaranca: Sum of Book% = 72.728
27/09/2025 14:14:50: [G_Auto 1] : Store Value (Shared) for Bearin Up: Book% = 10.87
27/09/2025 14:14:50: [G_Auto 1] : Store (range calc) Value (Shared) for Bearin Up: Sum of Book% = 83.597
27/09/2025 14:14:50: [G_Auto 1] : Store Value (Shared) for Conjecture: Book% = 10
27/09/2025 14:14:50: [G_Auto 1] : Store (range calc) Value (Shared) for Conjecture: Sum of Book% = 93.597
27/09/2025 14:14:50: [G_Auto 1] : Store Value (Shared) for Supreme Clarets: Book% = 4.167
27/09/2025 14:14:50: [G_Auto 1] : Store (range calc) Value (Shared) for Supreme Clarets: Sum of Book% = 97.764
27/09/2025 14:14:55: [G_Auto 1] : £ 3.94 Back bet placed on Zooter at 2.54. Fully matched at 2.54. Ref: 10000
27/09/2025 14:14:55: [G_Auto 1] : £ 1.28 Back bet placed on Assaranca at 7.8. Fully matched at 7.8. Ref: 10001
27/09/2025 14:14:55: [G_Auto 1] : £ 2.17 Back bet placed on Renovatio Angel at 4.6. Fully matched at 4.6. Ref: 10002
27/09/2025 14:15:29: Guardian has detected that the market is suspended
27/09/2025 14:15:31: Guardian has detected that the market is in-play
27/09/2025 14:15:32: Guardian has detected that the market is now unsuspended
27/09/2025 14:17:10: Guardian has detected that the market is suspended
Store the Counter selection against the market, not the selection, and then change this in the back bet rule too. You won't see it storing against every horse then.
Similarly, when you store the value 'Sum of Book%', store this for the market, not the current selection.
You'll obviously need to change this in the back bet rule too.
Similarly, when you store the value 'Sum of Book%', store this for the market, not the current selection.
You'll obviously need to change this in the back bet rule too.
- jamesedwards
- Posts: 4484
- Joined: Wed Nov 21, 2018 6:16 pm
Give each selection an SV A @ selection level of 1, (I assume this happens in your CSV file?)smgreyuk wrote: ↑Sat Sep 27, 2025 3:07 pmStill not out of the woods yet.
To recap I want to:
- Count how many horses are in the race (to rule out Non Runners) - if it's less than 6 as in there's a horse in that CSV that is now a non runner for this race, the race is a not bet
- Put in a Book% Condition based on the sum of the 6 selected. If the total book% of the 6 exceeds 80%, the race is a no bet.
One or possibly both seem to be going wrong.
Screenshot 2025-09-27 145447.png
It seems to be running through each horse in the logs and yet still assigning a 6 to Counter. Correct for the amount of horse names in the file with regards to the race but why include Fairydale ? This horse isn't in the CSV? (Maybe that's just a side effect of using the EVERY selection and Counter is still doing the job it needs to do)
Or is it? As only 3 of the 6 end up being backed (but possibly not the fault of the counter variable, maybe?)
With regards to the Book% Condition, I have it set to less than 80% but I think I know what it's doing wrong - I think it is totalling the book% total in increments with each horse and then when it hits the limit it then cuts the rest off in the list (I could be wrong there but that's my best guess as to why it only backs 3 of the 6 horses) - I would want it to total the book% of the entire 6, see that it's over 80% and not back any of them.
I'll attach the .baf if you could take a look please tommyc when you get a second, I may well be missing something obvious. (I tried attaching the .CSV but it won't let me, just to say 100% Fairydale is not in the CSV)
)(())(()))((()( BackTop 6 With Book Condition.baf
Create an SV B @ market level to equal 0 on condition that SV B @ market level has not been set
Then using every selection, on condition that SV A @ selection level = 1, then make SV B @ market level = SV B @ market level + SV A at selection level.
As long as all 6 are runners then this will leave SV B @ market level equalling 6.
You can then use the same principle to create an SV equal to the total book% of all 6 horses.