Creating a new BOT

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
robstar901
Posts: 7
Joined: Mon Nov 22, 2021 9:36 am

Hi All,

Hope everyone is well.

I am new to the forum and have just recently got the free trial of BetAngel as I'm looking to move more towards the automated side of things. I have traded for a few years now mainly just Football and Tennis markets and have had a decent amount of success.

Nowadays I don't have as much time to trade as I have other commitments, so I have been looking at hopefully creating a few different bots for football and tennis trading that I can monitor and tweak over time. I have watched lots of tutorial videos but I still can't quite get the hang of creating what I'm trying to achieve and was hoping I could get some advice or help from anyone. It would be truly appreciated. I have written below a example of a couple of the strategies I'm looking to automate.

Backing the favourite at HT;
Must be Drawing
odds 2.0 or above
Backing them again if the odds double from the first entry
Greening up if the favourite takes the lead or Hedge out for a loss if they fall a goal behind.
(Also is there a way of of having a signal if a team has been the more dominant team in the first half e.g. more possession, more shots on goal? Because obviously I would prefer to be backing favourites that are playing well. So ideally I would only like the trade to be placed if a signal is met.)

The 2nd trade is a tennis trade and it is basically opposing the first player who breaks serve in the final set;
No more than 6 games played in the final set
oppose the player who breaks first (Lay odds 1.5 or below)
Back 50% of stake if the player opposed is 0-30, 15-30, 30-40, on serve
Green up if the player opposed gets broken back, otherwise let it run until the end.

Thank you for any help, I would just like to know if the above is possible and just be pointed in the right direction if so.
Rob
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Both of what you've asked for can be done with the exception of using soccer stats (possession, shots on target etc) as this isn't available from Betfair's API

If you haven't already seen them it'll be worth having a look in the Tennis and Football shared files area, there should be some ready-made ones along the lines of what you are after which could be tweaked rather than starting from scratch
viewforum.php?f=50
viewforum.php?f=51

I think this tennis one would be a good one to build on, it already has a lay rule for a early break in 1st set
viewtopic.php?f=51&t=19171
robstar901
Posts: 7
Joined: Mon Nov 22, 2021 9:36 am

Hi Dallas,

Thanks very much for the reply, its really appreciated.

I will give some of these shared files ago now and see if I can tweak them to my strategy. I will let you know how I get on. I'm sure once I start understanding how it all works it should become slightly easier for me.

Thanks again for the reply :)
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

robstar901 wrote:
Mon Nov 22, 2021 5:10 pm
Hi Dallas,

Thanks very much for the reply, its really appreciated.

I will give some of these shared files ago now and see if I can tweak them to my strategy. I will let you know how I get on. I'm sure once I start understanding how it all works it should become slightly easier for me.

Thanks again for the reply :)

Image

If you get stuck just pop the the question on the end of the thread of the file you've downloaded and that will make it easier to advise the changes etc
robstar901
Posts: 7
Joined: Mon Nov 22, 2021 9:36 am

Hi Dallas,

I have attempted to create the Tennis strategy that I wrote above, but I'm not too sure if it is correct or not, I think its likely that there is errors. I couldn't figure out how to oppose the player that breaks serve first, so I just went with the player in selection 1 for now. I was also not sure how to back off the liability with the scores I mentioned above, so what I tried was to back the liability off at any break point instead. I'm pretty sure there must be a couple of mistakes in this or probably more lol, I was hoping you can point me in the right direction from here? Any questions please let me know, and any advice from you will be really appreciated.

Rob
You do not have the required permissions to view the files attached to this post.
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

robstar901 wrote:
Thu Nov 25, 2021 1:37 pm
Hi Dallas,

I have attempted to create the Tennis strategy that I wrote above, but I'm not too sure if it is correct or not, I think its likely that there is errors. I couldn't figure out how to oppose the player that breaks serve first, so I just went with the player in selection 1 for now. I was also not sure how to back off the liability with the scores I mentioned above, so what I tried was to back the liability off at any break point instead. I'm pretty sure there must be a couple of mistakes in this or probably more lol, I was hoping you can point me in the right direction from here? Any questions please let me know, and any advice from you will be really appreciated.

Rob
You were actually much closer than you thought and there was very little to do, but i've made those last final changes and will give you an overview of what i've done below, if you can check through the rules you'll see them better there

1, Applied rules to ANY selection (conditions will ensure it triggers on the correct player)

2, Rules
Oppose player, this was spot on, I just added a new signal rule to the bottom to trigger when a player gets to a 4th game, then on this rule used a signal set condition to ensure that it isn't set - once its set the rule can't trigger so it won't lay the player late on in the set
When this rule fires it also sets a signal named 'triggered' on the market (you'll see why below)

Back off 50%, was 99% done right, all I did was grouped the possible scores so it will trigger if any of them are true
I also added a signal set condition to test the signal named 'triggered' was set (just as a safety)

Green Up, also 99% right, I changed it to green up the selection (makes it easier if ever you are trading just one player)
and added the same signal set condition as above, it was mainly for this rule that signal was added (ie, that stops it triggering but doing nothing before there's been a break in the last set - it can now only trigger after the lay rule has and providing its other conds have been met ie, a break back)

You had everything right just missing those few minor things which is more just about learning what the rule/conditions etc can do which you'll pick up over time

So give this rule ago in PM and see if its working how you want now
You do not have the required permissions to view the files attached to this post.
robstar901
Posts: 7
Joined: Mon Nov 22, 2021 9:36 am

Hi Dallas,

Thank you very much for making these changes for me, I really appreciate it. I will try and use it this week, unfortunately as you probably already know the main tennis season has finished and starts up again in January! But there are still a few challenger events going on which I should be able to trial it on with really small stakes.

Again I honestly really appreciate your help with this, and I will let you know how it goes as soon as I have tested the strategy on a few games!

edit: I have just read over the changes you have mad and I can say they are definitely starting to sink in and I have a much better understanding now, so thank you. I have just realised 1 flaw that I have made! So originally I have it so I oppose the player who breaks first which is fine, but I realised the player could be 2 games ahead e.g. if they hold serve then break serve, I think I have fixed this by changing the rule of the server being 2 games or less ahead, but not sure how I would need to change the rules for when the opposed player is facing pressure or broken back? Or does it already do this and I have missed the point? Sorry to bombard you with questions I just wanted to make sure before I trial it that it is working in the way I want it to.

Rob
Last edited by robstar901 on Thu Nov 25, 2021 9:58 pm, edited 1 time in total.
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

robstar901 wrote:
Thu Nov 25, 2021 9:09 pm
Hi Dallas,

Thank you very much for making these changes for me, I really appreciate it. I will try and use it this week, unfortunately as you probably already know the main tennis season has finished and starts up again in January! But there are still a few challenger events going on which I should be able to trial it on with really small stakes.

Again I honestly really appreciate your help with this, and I will let you know how it goes as soon as I have tested the strategy on a few games!

Rob
No problem, and just to let you know BF don't' provide the live scores (which you'll need for your tennis rules to trigger) for all tournaments, so always make sure there is a score/server feed before trying a rule

Typically its only the ATP/WTA and grand slams they provide them for but you do sometimes get them for the lower tier challenger matches.

To make sure they have the scores you can add them to a watch list were you'll see if the scores are available
robstar901
Posts: 7
Joined: Mon Nov 22, 2021 9:36 am

Awesome. Thanks Dallas I will make sure I double check this before I try it out. Also not sure if you saw my edit above? I must have been replying at the same time lol!
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

robstar901 wrote:
Thu Nov 25, 2021 10:01 pm
Awesome. Thanks Dallas I will make sure I double check this before I try it out. Also not sure if you saw my edit above? I must have been replying at the same time lol!
Y, they must of crossed over as I missed it earlier, I've picked up on some points below

>>just read over the changes you have mad and I can say they are definitely starting to sink in and I have a much better understanding now, so thank you. I have just realised 1 flaw that I have made! So originally I have it so I oppose the player who breaks first which is fine, but I realised the player could be 2 games ahead e.g. if they hold serve then break serve I think I have fixed this by changing the rule of the server being 2 games or less ahead

That is a v.good spot, I missed that myself but you are correct on both counts
1, It was wrong
2, Using 2 or less games ahead is the correct set up for that condition for what you want

For the condition on the 'opposed player facing pressure' rule it would still be the same '2 or less games ahead' (as its still the same two scenario)

But for the green up if broken back this would need to be set as '1 or less games ahead'
The triggered signal condition on this green up rule will stop it from firing when a receiver is a game behind but its still on serve
ie, that condition effectively arms the green up rule, until it's set by your lay rule this rule can't trigger

As you are now seeing its just a case of thinking through the logic you want, all the options are there to select from and you can quite easily create some very complex rules covering a range of scenarios if you really wanted its just a matter of finding what you need among all the conditions and options :)
robstar901
Posts: 7
Joined: Mon Nov 22, 2021 9:36 am

Hi Dallas,

Thanks again for the reply and helping me with these changes. I can see why they call you the automation Guru 😁.

I really appreciate the help you have given. I'm really enjoying learning and I cant wait to put a few of the bots in action with small stakes. I'm going to try and make a football trading bot in the next few days and see how it goes so I might end up posting it again if you don't mind having a look. It's really the signals that I seem to be struggling with at the moment but I will get there!!
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

robstar901 wrote:
Fri Nov 26, 2021 6:20 pm
Hi Dallas,

Thanks again for the reply and helping me with these changes. I can see why they call you the automation Guru 😁.

I really appreciate the help you have given. I'm really enjoying learning and I cant wait to put a few of the bots in action with small stakes. I'm going to try and make a football trading bot in the next few days and see how it goes so I might end up posting it again if you don't mind having a look. It's really the signals that I seem to be struggling with at the moment but I will get there!!
No problem,

Image


and if it helps I've done a few posts on using Signals and Stored values for the first time
viewtopic.php?f=37&t=17725
viewtopic.php?f=37&t=16228
robstar901
Posts: 7
Joined: Mon Nov 22, 2021 9:36 am

Cheers Dallas, I will be sure to give these a read!
Post Reply

Return to “Bet Angel for newbies / Getting started”