Close Trade rules

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
karltrades
Posts: 13
Joined: Wed Jan 01, 2020 9:55 pm

Hi,

I have made an in-running lay to back automation file. This is the first one I have made myself from scratch, so if anyone replies please be patient with me! Anyway, today I had an unexpected win when the bot placed my stop loss (back bet) three times and the horse went on to win. This was because although I have 'offset with greening and stop' I also placed a 'Close Trade' rule further below this, so that if the trade profit with greening is less than -£5.50, it will close the trade. I thought this could protect me from a missed stop loss if the odds move very quickly. I allowed the rule to trigger five times, so that fast moving odds don't catch me out. I assumed that this would only fire in if the first time goes unmatched? I have a further rule which cancels all unmatched bets if the number of matched bets =2 (this is so that it doesn't take any back offsets that weren't previously unmatched if the odds move back out). I hope that this makes sense?

If anyone could help me, I am wondering now that I have changed the 'trade closure' rule to only fire in once, am I protected from this happening again?

Thanks in advance!
User avatar
Dallas
Posts: 22726
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

You won't need a cancel unmatched bets rule, the close trade will do that when it triggers.

But you do need to account for Betfairs in-play bet delay, which is 1 sec for horse racing (2secs if usings <£2 stakes)

So if you set your close trade rule to either 2 or 3 secs that will ensure only one gets placed at a time and if it needs to place another the previous one is in the market and able to be cancelled
karltrades
Posts: 13
Joined: Wed Jan 01, 2020 9:55 pm

Hey Dallas, thanks as ever for the reply.

I apologise for not understanding something which I'm sure is quite simple, are you saying that I can keep the rule to trigger 5 times, but I should set 'wait 2 seconds before re-arming?'

If you don't mind, there is something else which is bugging me, I am trying out a few different methods to see which one suits my style the best for when I'm not manual trading. If I wanted to split my lay bet into 3 parts at set percentage reductions of SP with an offset on each (I can do this part), how could I program the bot to cancel the lower lays if any of the higher ones match? I'm assuming it's with setting a signal? E.g:

Lay 1 with offset matches, cancel lay 2 and 3.
Lay 1 matches, Lay 2 matches and then both offsets match, cancel lay 3.
If lay 1 and 2 hit, but only the offset on Lay 2 matches I'd want to keep the offset on 1 but cancel the lay bet on 3.

I hope that makes sense, and thanks again for all the help you give on here.

Karl
User avatar
Dallas
Posts: 22726
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

>I apologise for not understanding something which I'm sure is quite simple, are you saying that I can keep the rule to trigger 5 times, but I should set 'wait 2 seconds before re-arming?'

Yes, you need to allow enough time for the in-play delay so your bet reaches the market and is either matched or unmatched before allowing it to fire again.


>If I wanted to split my lay bet into 3 parts at set percentage reductions of SP with an offset on each (I can do this part), how could I program the bot to cancel the lower lays if any of the higher ones match? I'm assuming it's with setting a signal? E.g:

You can use a cancel unmatched bets (price dependant) rule, with that you can configure it to cancel just certain bets ie, only lays, or lays below a certain price etc

Depending on what you want to achieve and the number of scenarios you may encounter you might have to set a few of these up
karltrades
Posts: 13
Joined: Wed Jan 01, 2020 9:55 pm

You can use a cancel unmatched bets (price dependant) rule, with that you can configure it to cancel just certain bets ie, only lays, or lays below a certain price etc
That makes sense, but how do I tell this to only kick in if the other offsets are matched?
User avatar
Dallas
Posts: 22726
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

karltrades wrote:
Wed Jul 08, 2020 11:38 am
You can use a cancel unmatched bets (price dependant) rule, with that you can configure it to cancel just certain bets ie, only lays, or lays below a certain price etc
That makes sense, but how do I tell this to only kick in if the other offsets are matched?
It depends on exactly when/where they are placed, there are conditions to cover just about every situation/scenario you can think of

For example you could use a 'matched bets amount condition' to test the amount/s that have been matched
Or if your bets are always being placed at the same price you would be able to use a 'fixed odds condition' to test the price
karltrades
Posts: 13
Joined: Wed Jan 01, 2020 9:55 pm

No, I would be looking to lay at % reductions of SP so the price would be different on each selection. I didn't actually realise you could do matched amounts, even though it's been right there in front of me all this time! I'd only seen the matched bets number. So I guess I could test for the amount matched on the back side, to cancel any unmatched lays. I just need to make sure that if lay 2 gets taken and the offset matched, that it doesn't cancel the offset for lay 1. I think I'll get there eventually, thanks again for the help!
User avatar
tootatoota
Posts: 56
Joined: Fri Apr 17, 2020 2:33 am

Hi all,
I have my bot working ok and only having trouble with my unmatched bets scenario.
I have keep all unmatched bets so they can get matched in play and then have a greening rule with a condition of Unmatched bets =0.
When it works its great and i like the fact of getting matched inplay rather than getting matched at a loss ,but i keep getting into trouble whan bets arent matched therefore my greening cannot happen.
Is there a better way of closing my trades and greening?
Appreciate any advice anyone has?
Thanks Toota
User avatar
Dallas
Posts: 22726
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

tootatoota wrote:
Wed Jul 15, 2020 4:36 am
Hi all,
I have my bot working ok and only having trouble with my unmatched bets scenario.
I have keep all unmatched bets so they can get matched in play and then have a greening rule with a condition of Unmatched bets =0.
When it works its great and i like the fact of getting matched inplay rather than getting matched at a loss ,but i keep getting into trouble whan bets arent matched therefore my greening cannot happen.
Is there a better way of closing my trades and greening?
Appreciate any advice anyone has?
Thanks Toota
First thing I'd say is if your greening in-play to avoid a small pre-off loss sooner or later you'll end up with a much bigger one, its never worked for anyone and never will.

But regarding the other part of the question why not just remove the unmatched bets condition?
If getting a profit relies on having all your bets matched then greening up - that brings me back to my first point that sooner or later it will end very badly
User avatar
tootatoota
Posts: 56
Joined: Fri Apr 17, 2020 2:33 am

Thanks Dallas point taken
Post Reply

Return to “Bet Angel - Automation”