Bet Angel - Automation : Timing - my theory

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
malky
Posts: 19
Joined: Mon Oct 12, 2009 11:09 am

Fri Dec 09, 2011 12:41 pm

One thing I have worked out with Automation is "timing is everything" - certainly everything if I want to minimise those nasty red numbers.

Here's my attempt at trying to understand how the timing of transactions of BetAngel trading on Betfair.
Please correct me if I'm wrong or if I have missed anything.

1. Rules run every refresh

2. The "wait X seconds before rearming" option - means the rules will only run on the first refresh after X seconds since the last run of the rules

3. When BetAngel submits a bet this occurs between 0ms and the refresh time. (it could be immediately or up to the refresh interval).

4. All bets in play are subject to a delay. This delay appears to be less than a second inplay on horse races and several seconds on soccer ? Can it be more ? Is there anyway of determining the absolute time delay, betfair as far as I can see does not publish this.

5. BetAngel can only detect an unmatched bet in a market at the next refresh. If the market is inplay it will be the refresh after following the the delay.

6. For the condition time since unmatched bets (U) needs to be greater than Refresh rate (R)

times 2, plus the inplay delay (D) (of course inplay delay = 0 if not inplay)
i.e. U>2R+D must be true to avoid the rule firing when a bet may be either unmatched or being posted to betfair

7. If the market is only in Guardian then the refresh rate must be multiplied by the number of markets Guardian is servicing.
The number of markets Guardian services can be reduced by use of Advance Setting > Restrict Refresh thereby reducing the time to refresh.

Feedback welcome

Bet Angel
Bet Angel
Bet Angel
Posts: 3554
Joined: Tue Apr 14, 2009 3:47 pm

Fri Dec 09, 2011 1:17 pm

malky wrote: 1. Rules run every refresh
Yes - everytime the prices of a market are refreshed (whether by the Bet Angel trading screen or Guardian) the rules are executed.
malky wrote: 2. The "wait X seconds before rearming" option - means the rules will only run on the first refresh after X seconds since the last run of the rules
Almost... let's say since the last 'trigger' of a rule. i.e. A rule can be processed on every refresh but not triggered due to the state of the conditions. Once triggered it won't be allowed to trigger again until the X seconds delay has expired.
malky wrote: 3. When BetAngel submits a bet this occurs between 0ms and the refresh time. (it could be immediately or up to the refresh interval).
It goes to betfair immediately, but the feedback to Bet Angel will be on the next refresh of bet information (governed by the refresh interval). If an inplay delay applies to the bet then that will need to expire at betfair before the bet shows up as matched or unmatched.
malky wrote: 4. All bets in play are subject to a delay. This delay appears to be less than a second inplay on horse races and several seconds on soccer ? Can it be more ? Is there anyway of determining the absolute time delay, betfair as far as I can see does not publish this.
The delay is one second for in-play horse racing and up to eight seconds for soccer/tennis.
malky wrote: 5. BetAngel can only detect an unmatched bet in a market at the next refresh. If the market is inplay it will be the refresh after following the the delay.
Correct
malky wrote: 6. For the condition time since unmatched bets (U) needs to be greater than Refresh rate (R)

times 2, plus the inplay delay (D) (of course inplay delay = 0 if not inplay)
i.e. U>2R+D must be true to avoid the rule firing when a bet may be either unmatched or being posted to betfair
Yes that sounds pretty reasonable. If your internet connection (or the betfair API) is less than perfect on a particular day, perhaps add another second or two for potential timeouts.
malky wrote: 7. If the market is only in Guardian then the refresh rate must be multiplied by the number of markets Guardian is servicing.
The number of markets Guardian services can be reduced by use of Advance Setting > Restrict Refresh thereby reducing the time to refresh.
Yes, each market will receive an update once every 'refresh rate * number of active markets' seconds. And yes the number of active markets will be reduced by using Restricted Refresh.

If you calculate that each market will receive an update every ten seconds, you should ensure that the time window specified in 'Rule Trigger Times' (difference between start and end times) is larger than ten seconds, otherwise a rule may not execute at all.

malky
Posts: 19
Joined: Mon Oct 12, 2009 11:09 am

Fri Dec 09, 2011 1:47 pm

thanks - very helpful

Zenyatta
Posts: 1067
Joined: Thu Mar 11, 2010 4:17 pm

Sat Dec 10, 2011 3:24 am

Trouble with automation, even it it works as expected 99 out of 100 times, the 1 time something happens you didn't expect can wipe out your bank if you are not there monitoring it. Here are just a few of the more obvious things that can go wrong:

(1) Your computer can crash/lose power/lose internet connection. Ideally,you need to use automation on a VPS with a constant high-speed internet connection.

(2) Betfair website can crash. The fail-safe is to immediately change the bet persistence of all unmatched bets to 'Take SP'

(3) The race can go off early. Same solution as above, use 'Take SP'

(4) The 'Take SP'solution won't always work because Betfair somtimes forget to change the market to 'In-Play'. Need perhaps to Green All at a fixed time relative to the event time.

(5) The automation commands occasionally won't work because of things such as suspended markets, missed bets, problems with account balances etc, etc. Need to make sure you fire the important ones ('Green All', 'Take SP') at least twice.

I hope these few examples show folks they need to be very very careful with the automation....

User avatar
fadamadrinha
Posts: 9
Joined: Sun Jul 11, 2010 1:48 pm
Location: Portugal

Mon Jan 30, 2012 6:40 pm

Great topic and information! ...Supose you are making a scalping rulethat fires to the market Back bets with offset active ...So the back bet was eated but the lay bet still waiting, then the Horse Race begins and your lay bet was cancelled and you got exposed to lose.

Is there any way to change that lay bet persistance to KEEP IN PLAY and have the probability to be eaten ?


Any help and feedback will be positive to all the automation fans!

User avatar
OnGoldWires
Posts: 49
Joined: Mon Jul 20, 2009 7:07 pm

Mon Jan 30, 2012 8:20 pm

Thanks Zenyatta, that is a good list of what can go wrong.

If I can add to it from my experience.

6) Event starts late and falls outside the scope of a restricted refresh.

7) Occasionally Inplay markets can be suspended for long periods for no apparent reason.

8) Lack of competition in the markets means the Book percentage conditions are not met.

Plus some that I haven't worked out yet.

I think it is always best to work out the worst case scenario if you are leaving you bets unattended and it might help to limit the liability in your account or put some of it out of harm's way (Australian Wallet or Bank Account - OR Lay Everton to win the league at 2.00 :lol: )

sarwanov
Posts: 2
Joined: Mon May 11, 2015 8:43 am

Wed Jun 17, 2015 7:40 am

you really have done great work.well done

User avatar
Frogmella
Posts: 166
Joined: Mon May 30, 2011 2:44 pm
Location: Towcester

Sat Feb 11, 2017 12:26 pm

Does this thread still apply now we are streaming?

User avatar
Dallas
Posts: 8437
Joined: Sun Aug 09, 2015 10:57 pm

Sat Feb 11, 2017 9:13 pm

Frogmella wrote:Does this thread still apply now we are streaming?
Yes its all still applicable just you can get market info upto 10 times faster now

Post Reply

Return to “Bet Angel - Automation”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests