Order Cancels Order Servant

Share your servants
Post Reply
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

These Servants are mainly intended for use on pre race and in-running horse racing markets, but could be used on tennis or any other similar market where the price can go either way.

The purpose of the servant is to place a few back orders above the current price and a few lay orders below the current price then which ever side gets one matched first the servant will cancel all the orders on the other side – hence the name Order Cancels Order.

There are two servants for download below, (one for pre-race the other In-Play) and both follow that same principal. Either one can be started on any selection and more than one time (just make sure the status light is red to indicate the previous one has finished).

Both servants place a spread of 3 back bets and 3 lay bets outside the current price, both use fill / kill and both offset with greening if any bets are matched, both also use ‘Percentage of Context stake’ which means the stake you have chosen above your ladder or on the one-click screen for that selection at the time you start the servant.

The first back and lay bets use 25% of the context stake
The second back and lay bets use 35% of the context stake
The third back and lay bets use 40% of the context stake

Below is a more detailed description of each individual servant

ASC Order Cancels Order
When started this will place 3 back bets at 3, 4 & 5 ticks above the current price and 3 lay bets at 3, 4 & 5 ticks below the current price. If none are matched after 60 seconds, they are ALL killed, and you will need to start the servant again.

Once either side has one matched all the other side are cancelled, the matched bet is then offset by 2 ticks with greening, if either of the remaining bets are also matched (within the same 60secs) they too will be offset by 2 ticks with greening.

Below is an example of when you might want to use this servant, you can see it has an average looking traded range with the price currently near the middle so when the servant is started it places the bets as described above so you’re effectively covering the top and bottom of this traded range and when one or more gets matched the ones at the opposite end are cancelled.

Lets assume the £12.50 back bet at 7.6 is matched first, all the lays at 5.9 - 6.2 are cancelled, the back bet is offset by 2 ticks, the £17.50 back bet at 7.8 is also matched and offset by 2 ticks.
The price then start to shorten mean while the remaining £20 back bet at 8.0 is killed because its been 60 sec since the servant was started. As the price shortens it matches the two offset bets so your now fully greened up and the price has returned to the middle of its range - where your now able to start the servant again.


OCO Image.JPG


ASC Order Cancels Order IP
This works in the same way but because its intended for use in-play some changes have been made to the placement, fill /kill times & offset ticks etc.

When using it in-play your looking for a selection who's odds are generally bouncing up and down (not steaming in or drifting out) so that like above when you start the servant your aiming to catch one of these bounces, cancel the other side and offset those that are matched.

When started this will place 3 back bets at 5, 10 & 15 ticks above the current price and 3 lay bets at 5, 10 & 15 ticks below the current price. If none are matched after 10 seconds, they are ALL killed, and you will need to start the servant again.

Once either side has one matched all the other side are cancelled, the first matched bet is then offset by 5 ticks with greening, the second bet if matched is offset by 8 ticks with greening and the third by 12 ticks with greening.

To use the file just click on either or both of the .Baf attachment links below and this will download it to your computer, then open your Servant Manager window and click the rules link at the top and then "Import a Rules File" as shown in the image, once imported it will now appear in your drop down boxes and is ready to be started whenever required.

Once you have it imported into your Servant Manager it can be edited very easily simply by clicking on "Edit Rules File".

With any servant always run in practice mode first to ensure everything is working fine, and repeat this each time you make any changes.

See the following thread for step by step instructions on downloading and importing a servant into your Bet Angel, or see image below on were to import it in your Servant Manager.
viewtopic.php?f=57&t=15194
You do not have the required permissions to view the files attached to this post.
User avatar
megarain
Posts: 2040
Joined: Thu May 16, 2013 1:26 pm
Contact:

Hi,

I modifyed your baf .. I will upload, but, am finding if I have a previously matched bet, its not working as I thght it should.

Here is the log, of a recent race.

24/11/2017 14:21:44: Market changed to Catt 24th Nov - 14:25 1m7f Nov Hrd
24/11/2017 14:22:03: £ 5.00 Back bet placed on Parthenius at 2.06. Entirely unmatched when it initially reached the market. Ref: 109480005428
24/11/2017 14:22:06: £ 5.10 Lay bet placed on Parthenius at 1.98. [Liability staking]. Entirely unmatched when it initially reached the market. Ref: 109480012871
24/11/2017 14:26:01: Market has been suspended
24/11/2017 14:26:02: Market has been unsuspended
24/11/2017 14:26:02: Market is in-play
24/11/2017 14:26:38: [AS 280] : Automation Servant ( ASC order cancels in IP - racing v2 - fillkill 1 sec ) Started ( Selection context: Parthenius. Back Stake context: £50.00 . Lay Stake context: £50.00 [Liability staking]. )
24/11/2017 14:26:38: [AS 280] : Matched bets checkpoint created at:
Parthenius : 1 back bets, 1 lay bets, £5.00 back stake, £5.10 lay stake.
Hello Bertie : 0 back bets, 0 lay bets, £0.00 back stake, £0.00 lay stake.
Rockalzaro : 0 back bets, 0 lay bets, £0.00 back stake, £0.00 lay stake.
The Steward : 0 back bets, 0 lay bets, £0.00 back stake, £0.00 lay stake.
Jacbequick : 0 back bets, 0 lay bets, £0.00 back stake, £0.00 lay stake.
Almunther : 0 back bets, 0 lay bets, £0.00 back stake, £0.00 lay stake.
Young Tom : 0 back bets, 0 lay bets, £0.00 back stake, £0.00 lay stake.
Auxiliary : 0 back bets, 0 lay bets, £0.00 back stake, £0.00 lay stake.
Great Colaci : 0 back bets, 0 lay bets, £0.00 back stake, £0.00 lay stake.
Frozon : 0 back bets, 0 lay bets, £0.00 back stake, £0.00 lay stake.
Dutch Artist : 0 back bets, 0 lay bets, £0.00 back stake, £0.00 lay stake.
Heather Burning : 0 back bets, 0 lay bets, £0.00 back stake, £0.00 lay stake.
Calypso Delegator : 0 back bets, 0 lay bets, £0.00 back stake, £0.00 lay stake.

24/11/2017 14:26:39: [AS 280] : £ 12.50 Back bet placed on Parthenius at 1.94. Entirely unmatched when it initially reached the market. Ref: 109480559471 ( Fill or kill bet with 1 seconds delay. Offsetting by 5 ticks with greening. )
24/11/2017 14:26:39: [AS 280] : £ 25.97 Lay bet placed on Parthenius at 1.77. [Liability staking]. Entirely unmatched when it initially reached the market. Ref: 109480559920 ( Fill or kill bet with 3 seconds delay. Offsetting by 16 ticks with greening. )
24/11/2017 14:26:39: [AS 280] : £ 22.73 Lay bet placed on Parthenius at 1.77. [Liability staking]. Entirely unmatched when it initially reached the market. Ref: 109480559903 ( Fill or kill bet with 2 seconds delay. Offsetting by 12 ticks with greening. )
24/11/2017 14:26:39: [AS 280] : £ 15.24 Lay bet placed on Parthenius at 1.82. [Liability staking]. Fully matched at 1.81. Ref: 109480559911 ( Fill or kill bet with 1 seconds delay. Offsetting by 5 ticks with greening. )
24/11/2017 14:26:39: [AS 280] : £ 17.50 Back bet placed on Parthenius at 1.99. Entirely unmatched when it initially reached the market. Ref: 109480559895 ( Fill or kill bet with 2 seconds delay. Offsetting by 12 ticks with greening. )
24/11/2017 14:26:39: [AS 280] : £ 20.00 Back bet placed on Parthenius at 2.08. Entirely unmatched when it initially reached the market. Ref: 109480559936 ( Fill or kill bet with 3 seconds delay. Offsetting by 20 ticks with greening. )
24/11/2017 14:26:39: [AS 280] : Automation Signal for Parthenius: lay = 1
24/11/2017 14:26:39: [AS 280] : £ 20 unmatched bet (Ref:109480559936) was killed.
24/11/2017 14:26:40: [AS 280] : £ 17.5 unmatched bet (Ref:109480559895) was killed.
24/11/2017 14:26:40: [AS 280] : £ 12.5 unmatched bet (Ref:109480559471) was killed.
24/11/2017 14:26:40: [AS 280] : £ 22.73 of unmatched bet (Ref:109480559903) was filled before remainder was killed.
24/11/2017 14:26:40: [AS 280] : £ 25.97 of unmatched bet (Ref:109480559920) was filled before remainder was killed.
24/11/2017 14:26:40: [AS 280] : £ 14.83 Back bet placed on Parthenius at 1.86. Entirely unmatched when it initially reached the market. Ref: 109480562167
24/11/2017 14:26:41: [AS 280] : £ 21.29 Back bet placed on Parthenius at 1.89. Entirely unmatched when it initially reached the market. Ref: 109480563697
24/11/2017 14:26:41: [AS 280] : £ 23.82 Back bet placed on Parthenius at 1.93. Entirely unmatched when it initially reached the market. Ref: 109480563717
24/11/2017 14:26:55: Cancelling bets 109480562167 109480563697 109480563717
24/11/2017 14:27:01: Placed closure bet on Parthenius by Backing 63.10 at 1.8
24/11/2017 14:27:01: [AS 280] : Automation Signal for Parthenius: back = 1
24/11/2017 14:27:02: [AS 280] : Automation Servant ( ASC order cancels in IP - racing v2 - fillkill 1 sec ) Stopped.


Is it possiblt to ammend the baf, so, this wont be a problem ?
ASC order cancels in IP - racing v2 - fillkill 1-3 secs.baf
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

What is it not doing? or in what way is iy not working?
It checkpoints the matched bets each time its started so any previous ones should be discounted

I can see on the back 3 condition you have 2 x LTP <5 (I assume 1 should be LTP >1.6 as per the other rules)?
User avatar
megarain
Posts: 2040
Joined: Thu May 16, 2013 1:26 pm
Contact:

Thx, that might be part of the problem .. but, in your version, when 1 bet was matched, all the rest is cancelled, and reverse trades sent.

In my version, once one bet is matched, nothing really happens.

Will video, n a short while.
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

megarain wrote:
Fri Nov 24, 2017 2:49 pm
Thx, that might be part of the problem .. but, in your version, when 1 bet was matched, all the rest is cancelled, and reverse trades sent.

In my version, once one bet is matched, nothing really happens.

Will video, n a short while.
I cant see anything obvious in your file that would stop it but if it continues let me know and ill try running it to see if I can spot why its not working
User avatar
megarain
Posts: 2040
Joined: Thu May 16, 2013 1:26 pm
Contact:

I have a long video, which I think worked ok, but, there were no previous bets on the mkt.

https://www.dropbox.com/s/cklkrt38ni1sk ... y.mp4?dl=0

Stuff only really happens, from 4m 20 .. I shud have cropped, but havent got software.

Will leave it, as example as what servant does.

Am trying to re-create, with previous bets in mkt .. but, now have ckt etc.

Will maybe only be able to test tmrrw.
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

megarain wrote:
Fri Nov 24, 2017 5:41 pm
I have a long video, which I think worked ok, but, there were no previous bets on the mkt.

https://www.dropbox.com/s/cklkrt38ni1sk ... y.mp4?dl=0

Stuff only really happens, from 4m 20 .. I shud have cropped, but havent got software.

Will leave it, as example as what servant does.

Am trying to re-create, with previous bets in mkt .. but, now have ckt etc.

Will maybe only be able to test tmrrw.
OK just post back if it doesn't work as you expect tomorrow

Previous matched bets should'nt effect it because it only use a 'matched bets amount' condition to set the signal (which then cancels the correct bets)
but each new time its started the 'checkpoint matched bets' will reset this to zero as far as the servant concerned
User avatar
megarain
Posts: 2040
Joined: Thu May 16, 2013 1:26 pm
Contact:

I think I might have fixed this ****************Disclaimer -- I know v little about programming***************************************

I wanted the servant to kill the other 2 backs/lays, if theback/lay closest to the market was matched. Now, its possible this rule is redundent. I should just send 1 back or lay .. but, am not sure ofBetfair matching logic, if someone sweeps mkt from top.

So, I added 2 rules at the bottom of the file. It seems to be working, as I expect/wanted.

I would advise anyone downloading, to test in practice mode.

https://www.dropbox.com/s/sdtwcn15kszq8 ... 3.mp4?dl=0
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Bet Angel - Servants - Shared files”