How to cancel an unmatched bet without cancelling an unmatched offset position?

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
Stubbo
Posts: 56
Joined: Fri Dec 02, 2016 8:44 am

I'm looking to open both a lay and back bet on a selection at the start of a race in a 'value' position, with an Offset with Greening Rule in both cases.

When the first of the two positions is taken (e.g. the selection drifts and the back bet is taken) I want to cancel the lay bet that was placed initially, but not cancel the offset bet which will be placed into the market on matching of the back bet.

Is this achievable?

Thanks in advance.
User avatar
Dallas
Posts: 23599
Joined: Sun Aug 09, 2015 10:57 pm

You can use the 'Cancel unmatched bets (price dependant)' rule to specify only certain ones are cancelled
Stubbo
Posts: 56
Joined: Fri Dec 02, 2016 8:44 am

Thanks Dallas.

Could you explain how this works? Do I need to know the value the bet was placed at? If I'm using a 'relative to SP' rule to create the bet, how would I know how to specify the bet to cancel?

Thanks for responding so swiftly!
Stubbo
Posts: 56
Joined: Fri Dec 02, 2016 8:44 am

As an example:

Rule 1. Back Bet placed at X% above SP, Offset X% below SP
Rule 2. Lay Bet placed at X% below SP, Offset X% above SP

When Rule 1's bet is filled, I'm looking for Rule 2s bet to get cancelled, but without cancelling the greening stake amount Rule 2 will have placed at the same location in all liklihood.

Is there anything I can do about this? Do I need to use an Offset of Y instead of X?

And how would I do the targetting of the bet to cancel given I'm using a % value and not a fixed price location?

Thanks for your help!
User avatar
Dallas
Posts: 23599
Joined: Sun Aug 09, 2015 10:57 pm

You just need to work out where roughly the unmatched bets you want to cancel would be situated

An example could be if you were offsetting for 15 ticks and the current price is 5.0 and you place bets 10 ticks above & below (back 6.0, lay 4.0)

On your unmatched bets rule, you could say;

Price - Custom ticks above Best Reverse Market price 16
(as the best price would be around 4.0 if your lay has just been matched 16 ticks above this would be sitting at 5.6)
Cancel all bets => Price parameter

Your 15 tick offset would be placed at 5.5

So you're cancelling all unmatched bet @ 5.6 or above which includes your initial back bet at 6s but not your offset @ 5.5
Stubbo
Posts: 56
Joined: Fri Dec 02, 2016 8:44 am

Ok so I'll need to adjust my strategy a bit which is all % based in order to facilitate the cancellation, as there is no way to identify the bet different to the offset except by price.

Thanks for your help on this.
User avatar
Dallas
Posts: 23599
Joined: Sun Aug 09, 2015 10:57 pm

Stubbo wrote:
Sat Jan 26, 2019 4:41 pm
Ok so I'll need to adjust my strategy a bit which is all % based in order to facilitate the cancellation, as there is no way to identify the bet different to the offset except by price.

Thanks for your help on this.
You shouldn't need to adjust your strategy just find the points at which your 'placed' bet and 'offset' will sit in relation to each other and set the cancel parameters around that
Using % of ticks from current price will work the same as the earlier example given

The only other way would be not to use offsets, instead cancel bets after one of your bets is matched, then using 'net' stake place an opposing bet X ticks or % away from the price where your offset would have been.
You'll then need to green when it gets matched
eatyourgreens
Posts: 282
Joined: Sun Feb 18, 2018 12:53 am

hi,
I am far from being very good with this automation stuff, but could this be an easy answer? :-

As your bets are inplay I think there will be a 1 second delay in them reaching the market, therefore, if you had a "cancel all bets rule" with condition "number of matched bets = 1" your unwanted bet should cancel before your offset hits the market :)

Just A thought, maybe some one could confirm that it would work.

Have a nice day! :-)
User avatar
Dallas
Posts: 23599
Joined: Sun Aug 09, 2015 10:57 pm

eatyourgreens wrote:
Sun Jan 27, 2019 6:03 pm
hi,
I am far from being very good with this automation stuff, but could this be an easy answer? :-

As your bets are inplay I think there will be a 1 second delay in them reaching the market, therefore, if you had a "cancel all bets rule" with condition "number of matched bets = 1" your unwanted bet should cancel before your offset hits the market :)

Just A thought, maybe some one could confirm that it would work.

Have a nice day! :-)
Yes that would certainly work

I've just re-read the OP again and I have still taken 'the start of the race' to mean just before the off but if that's wrong and if he/she is betting 'in-running' then your suggestion will be the easiest option for what they want to achieve
Stubbo
Posts: 56
Joined: Fri Dec 02, 2016 8:44 am

I like the idea of using the delay to cancel the unmatched bets.

However something weird is going on. Everything runs fine (although matched bet = 1 seems to fail...as if less than the full stake is taken, then the cancel still triggers it would seem) so I've changed it to 'matched amount = single bet stake).

After the cancel is triggered though, a new pair of bets seem to get opened (which do not relate to any of the conditions used, and the 'cancel all unmatched' I don't understand how this is triggering this behaviour.

I've attached the automation log and the execution screen shots to this message, and if you can help suss out what is going on would be very grateful.

10036 and 10037 are the initial Back and Lay bets placed. 10036 gets matched, and 10037 gets cancelled. After this until the later Green Up, all that should happen is the single Offset bet as created as part of 10036 should be created. (assumedly this is 10039).

So I've not idea where 10040 is coming from?

None of the rules designed to create back/lay bets have triggered more than once, and the GreenUp isn't triggered until well after this all happens.

This is happening consistently every race.

Any ideas why this extraneous extra bet is being created, and what rule is causing it?
You do not have the required permissions to view the files attached to this post.
User avatar
Dallas
Posts: 23599
Joined: Sun Aug 09, 2015 10:57 pm

To use 'eatyourgreens' suggestion of using a cancel rule with the in-play delay would only work if your only placing one back & lay opening bet

If you want to repeat the process over and over it won't work as the cancel rule would require multiple triggers and would there keep cancelling the offset bets too.

So if your repeating the process over and over (once the offset is matched) then you'll need to revert back to my original suggestion or include signals to adapt what 'eatyourgreens' suggested slightly
Stubbo
Posts: 56
Joined: Fri Dec 02, 2016 8:44 am

Im only repeating this once on any given runner, just multiple times across the whole market.

The example attached only executed on one runner on one occasion but still the multiple entries were seemingly placed.
User avatar
Dallas
Posts: 23599
Joined: Sun Aug 09, 2015 10:57 pm

Stubbo wrote:
Mon Jan 28, 2019 5:54 pm
Im only repeating this once on any given runner, just multiple times across the whole market.

The example attached only executed on one runner on one occasion but still the multiple entries were seemingly placed.
You'll need the following condition on your opening back/lay rules to ensure there are only placed on a selection once
'number of place bet triggers condition'
on selection is equal to 0

The easiest thing to do with the cancel unmatched bets rule is to create several of them each applied to an individual row index, then arm them all to trigger just 1 time

With the following condition added to each
number of unmatched bets condition
is equal to 1

That should do it
Stubbo
Posts: 56
Joined: Fri Dec 02, 2016 8:44 am

Thanks for help. I sussed the problem - the Offset Bet with Greening wasn't set as Fill or Kill so the Offset bet was being placed immediately as opposed to on fill of the original stake.

Working like a charm seemingly now.

Cheers for the assistance one and all.
Post Reply

Return to “Bet Angel - Automation”