Using an external csv file to bet

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
wje200
Posts: 9
Joined: Mon May 29, 2023 1:56 pm

I don't get this at all.
I want guardian to read an external csv file containing my list of horse bets for the day - can sort of do that.
It looks like this:
1
*,*,*,*,B,S1,"Blow The Budget"
*,*,*,*,B,S2,"Jaminoz"
*,*,*,*,B,S3,"Spit Spot"
etc
Passes the file check.
But then what do I do with it when it's in guardian, I have SV names S1, S2, S3 etc. I want to compare every race for that day with all selections against the list and if there is a match then a bet is placed.
At the moment I have a automation file set up where I do a text comparison against a list I paste into the text comparison box every day, Works fine but I want to automate it more.

I have had a look at -->> https://www.betfairtradingblog.com/bet- ... utomation/ and that doesn't seem to explain how to do it.
Is there another resource or even a dummy automation file I could have a look at.

So the process is:
1. Read the csv file
2. Check every race for that day.
3. If there one or more match, place a bet (or bets) at (say) post time.

Kind Regards
Will
sionascaig
Posts: 1074
Joined: Fri Nov 20, 2015 9:38 am

If I understand you correctly, you just want to place a bet if horse is on your list?

In which case what you are doing is fine (you would be just replacing one copy & paste with another but adding in a read csv rule as well)...

The advantage of using the CSV method would be if you also wanted to set say a max price and / or min price that would have to be met if a bet is to be placed (or condition on some other parameter that will be read in).

To do that the CSV will contain the Horse Name with say MaxPrice & MinPrice as the two SV's.

And your bet rule (applied to EVERY selection) will use a condition on one or both of the above stored values meeting whatever criteria. (no need to worry about the horse name here as if not in the CSV file then no SV will be set and condition will be false)...
wje200
Posts: 9
Joined: Mon May 29, 2023 1:56 pm

Maybe I confused you.
I want to eliminate any cutting and pasting.
The csv file is produced automatically via another program which generates the list of horse names (for the current day).
I want to pull that into BA then have BA place a bet whenever it sees a horse name match in any of the days races.
sionascaig
Posts: 1074
Joined: Fri Nov 20, 2015 9:38 am

Just name the SV exactly the same for each horse then and set with a value of say 1.... for example:

* * HorseName1 * S Flag 1
* * HorseName2 * S Flag 1

Once the file is read in it will set the SV Flag = 1 for each named horse (which you can see in log).

The bet rule then just needs to condition on whether the SV Flag has been set with value (or Flag =1).

The bet rule should apply to EVERY horse in race and will then only trigger if Flag is set for that horse.
wje200
Posts: 9
Joined: Mon May 29, 2023 1:56 pm

I have had a go at this without success.
Attached is myTest.baf, myTest.csv and myTestLog.txt (it would not allow me to upload .txt and .csv files so I have had to attach jpegs instead) (.baf ok)

The automation file reads in the market selections, then reads in the csv file then tries to do a comparison and place a bet if any of them match.
Except is doesn't work.

Hopefully someone could have a look and tell me what I'm doing wrong.
MyTestLog.JPG
testCsv.JPG
MyTest.baf
You do not have the required permissions to view the files attached to this post.
wje200
Posts: 9
Joined: Mon May 29, 2023 1:56 pm

FWIW
I managed to get this working by modifying the csv file (trail and error) to the following format:

1
*,*,Tilsitt,*,S,Flag,"Tilsitt"
*,*,Heritier De Sivola,*,S,Flag,"Heritier De Sivola"
*,*,Hes Home Again,*,S,Flag,"Hes Home Again"
*,*,Phoenix Beach,*,S,Flag,"Phoenix Beach"

The 3rd parameter is the horse name and the last one is the same horse name in quotes.
I have no idea if that's the way it's meant to be done but I have now got a working rules file.

Happy bunny :D
Kind Regards
Will
Post Reply

Return to “Bet Angel for newbies / Getting started”