How do you avoid those horrible green > red moments?

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
ricardodeano
Posts: 205
Joined: Tue Oct 06, 2015 2:03 pm

Afternoon all

Hope you're all having a nice profitable day.

Ok, I've attached the back to lay file I've been using - I place a back bet at a fixed price of 1000 knowing full well it won't get matched, take the sp and then see what happens in play. If the green up condition is over £20, I green up for a profit, if it's under £25 I green up for a loss. And here is the log for said race:

23/03/2016 16:29:58: [G_Auto] : £ 50.00 Back bet placed on Fine Parchment at 1000. Entirely unmatched when it initially reached the market. Ref: 10029
23/03/2016 16:29:58: [G_Auto] : Modify bet persistence 10029 from 'Cancel' to 'Keep'

23/03/2016 16:29:58: [G_Auto] : Modify bet persistence 10029 from 'Cancel' to 'Take SP'

23/03/2016 16:30:54: Guardian has detected that the market is suspended
23/03/2016 16:30:54: Guardian has detected that the market is in-play
23/03/2016 16:30:54: Guardian has detected that the market is now unsuspended
23/03/2016 16:32:27: [G_Auto] : Placed closure bet with greening on Fine Parchment by Laying 72.89 at 10
23/03/2016 16:32:34: [G_Auto] : Cancelling bets 10030
23/03/2016 16:32:35: [G_Auto] : Placed closure bet with greening on Fine Parchment by Laying 35.52 at 11.5
23/03/2016 16:35:33: [G_Auto] : Placed closure bet with greening on Fine Parchment by Backing 79.91 at 5
23/03/2016 16:37:03: Guardian has detected that the market is suspended

Now I'm sure those who have greened up in running have seen something like this before (it can't just be me) . The image, B2L1.png , was taken shortly after 16:32:27 i.e. the first green was placed. I was in a profitable position green wise but suddenly had a large liability if Fine Parchment came in.

Indeed, Fine Parchment continued to come in triggering the green for a loss (16:35:33) which is reflected in the B2L2.png image.

So my question is this, how do I avoid getting into those situations in the first place with in running bots?

Is it possible to write a green up rule that only greens up that can spot if one selection is in the negative as compared to the others (or is in fact in the positive where the others are in the negative)?

Does this even make sense?
You do not have the required permissions to view the files attached to this post.
User avatar
jimibt
Posts: 4194
Joined: Mon Nov 30, 2015 6:42 pm

Ricardo - your log entries look a bit wrong to me. Based on your rules, you should have a set of log entries that look a bit like the following:

23/03/2016 18:11:08: Market changed to Kemp 23rd Mar - 18:15 1m Mdn Stks
23/03/2016 18:14:56: [G_Auto] : £ 120.00 Back bet placed on Al Hamd at 1000. Entirely unmatched when it initially reached the market. Ref: 10566
23/03/2016 18:14:57: [G_Auto] : Modify bet persistence 10566 from 'Cancel' to 'Keep'

23/03/2016 18:14:58: [G_Auto] : Modify bet persistence 10566 from 'Keep' to 'Take SP'

23/03/2016 18:20:16: Market has been suspended
23/03/2016 18:20:17: Market is in-play
23/03/2016 18:20:17: Market has been unsuspended
23/03/2016 18:20:35: [G_Auto] : Greened up Al Hamd by Laying 143.08 at 1.3
23/03/2016 18:21:57: Market has been suspended

I've marked in bold the steps that I think should be occurring. To me, it looks like you had a back bet placed way after the greening lay bet was placed, thus making the picture a little less clear and definitely making things less robust in terms of what you are trying to achieve. One very important thing to triple check - make sure that your computer time is synced up with world clock as the driver of the rules appears (from what I can gather) to be governed by your system clock and not an external reference!!

That said, I'm a complete newb at this with only 2 days experience thus far - lol

Take care
jim
User avatar
jimibt
Posts: 4194
Joined: Mon Nov 30, 2015 6:42 pm

Ricardo - I just got exactly the same issue as you :) - see log below:

23/03/2016 19:13:53: Market changed to Kemp 23rd Mar - 19:15 2m Hcap
23/03/2016 19:14:56: [G_Auto] : £ 100.00 Back bet placed on Wolf of Windlesham at 1000. Entirely unmatched when it initially reached the market. Ref: 10575
23/03/2016 19:14:57: [G_Auto] : Modify bet persistence 10575 from 'Cancel' to 'Keep'

23/03/2016 19:14:58: [G_Auto] : Modify bet persistence 10575 from 'Keep' to 'Take SP'

23/03/2016 19:15:16: Market has been suspended
23/03/2016 19:15:16: Market is in-play
23/03/2016 19:15:17: Market has been unsuspended
23/03/2016 19:17:55: [G_Auto] : Greened up Wolf of Windlesham by Laying 125.44 at 1.95
23/03/2016 19:18:04: [G_Auto] : Cancelling bets 10576
23/03/2016 19:18:05: [G_Auto] : Greened up Wolf of Windlesham by Laying 143.89 at 1.7
23/03/2016 19:18:27: [G_Auto] : Placed closure bet with greening on Wolf of Windlesham by Backing 206.75 at 1.03
23/03/2016 19:18:48: Market has been suspended

Strange scenario (where marked in bold). This race was netting £25 on greening, and then did the extra un-issued commands...

So yes, your question definitely does hold!!

jim
ricardodeano
Posts: 205
Joined: Tue Oct 06, 2015 2:03 pm

Hi Jim

I'd say it's a fairly regular occurrence, probably 1 in 20 races but obviously, one of those going completely against you could wipe a bank quite easily.
User avatar
jimibt
Posts: 4194
Joined: Mon Nov 30, 2015 6:42 pm

At the risk of making this thread a bit too *chatty*, I'll experiment with this too and try a raft tomorrow to see if a pattern can be discerned. As it stands it definitely means that a greened up profit can easily be wiped away before you've had a chance to withdraw the rule (and/or cancel those pesky extraneous lay/back bets manually)

til the next time
jim
Tanden
Posts: 43
Joined: Wed Mar 05, 2014 12:07 am

To ricardodeano

Your screenshot shows a large negative on Fine Parchment even though that was the horse that was backed.

The only way this can happen (given that Fine Parchment is the only selection with bets on) is if too much has been layed.

Given that the screenshot shows £57.52 green on all other runners then a total of £107.52 must have been layed (considering the original back bet was £50.00).

The second closure bet is for £35.52 at 11.5 which would make sense if about £32.05 of the original closure bet had been matched.

We can see "Cancelling bets 10030" in the log and I assume it was to cancel the remaining balance of the first closure bet.

However, it appears to me, that before Betfair could process the cancel command, £72.00 of the remaining balance of the original closure bet got matched.

Total layed at this point now stands at £72.00 + £35.52 = £107.52 giving you the position shown in your screenshot.

You should check your Betfair P&L to see how much of the original closure bet was actually matched and that would tell us if what I have said above is possible.

If this did happen, I would imagine you would need to make sure all previous closure bets had been cancelled before issuing another.

The only way I can think of is to have a cancel unmatched bets rule that fires continuously (with a suitable re-arm) and a condition on the closure rule to only fire if unmatched bets = 0.

Having said that, the closure rule has been used in its current form for years so I would be interested to see what one of the automation experts has to say.
ricardodeano
Posts: 205
Joined: Tue Oct 06, 2015 2:03 pm

Hi Tanden

"You should check your Betfair P&L to see how much of the original closure bet was actually matched and that would tell us if what I have said above is possible."

This was in practise mode - however I have seen it with real cash as well.

It 'felt' as you described - a portion was matched, then went the other way.

"The only way I can think of is to have a cancel unmatched bets rule that fires continuously (with a suitable re-arm) and a condition on the closure rule to only fire if unmatched bets = 0."

I'm not sure how to implement that :S

"Having said that, the closure rule has been used in its current form for years so I would be interested to see what one of the automation experts has to say."

Dallas, looking in your direction here ;)
User avatar
Crazyskier
Posts: 1278
Joined: Sat Feb 06, 2016 6:36 pm

ricardodeano wrote:Hi Tanden

"You should check your Betfair P&L to see how much of the original closure bet was actually matched and that would tell us if what I have said above is possible."

This was in practise mode - however I have seen it with real cash as well.

It 'felt' as you described - a portion was matched, then went the other way.

"The only way I can think of is to have a cancel unmatched bets rule that fires continuously (with a suitable re-arm) and a condition on the closure rule to only fire if unmatched bets = 0."

I'm not sure how to implement that :S

"Having said that, the closure rule has been used in its current form for years so I would be interested to see what one of the automation experts has to say."

Dallas, looking in your direction here ;)

You might also wish to read my thread where BA closure (green-up) actually increased liability to more than the original maximum loss -

viewtopic.php?f=2&t=11402

USE WITH CAUTION, especially in the latter stages of race.
ricardodeano
Posts: 205
Joined: Tue Oct 06, 2015 2:03 pm

Thanks Crazyskier

Yes this has certainly put my idea of just leaving my automation to run it's course over the day - certainly for this rule set :?
User avatar
Dallas
Posts: 23490
Joined: Sun Aug 09, 2015 10:57 pm

Tanden has got the series of events spot on in terms of the betting pattern.

You said you have your close to trigger if the profit value is above £20, but how many times do you have this set to trigger and what re-arm times are you using for it - your log suggests there is several seconds between the attempts?
ricardodeano
Posts: 205
Joined: Tue Oct 06, 2015 2:03 pm

Hi Dallas

Currently it's set to 2 triggers, 3 seconds apart.
User avatar
Dallas
Posts: 23490
Joined: Sun Aug 09, 2015 10:57 pm

I always set my IR green ups to trigger at least 3 times with either a 1 or 2 sec re-arm.
ricardodeano
Posts: 205
Joined: Tue Oct 06, 2015 2:03 pm

Interesting - cheers Dallas, I'll give that a look and see if I get any more 'funnies'
PeterLe
Posts: 3724
Joined: Wed Apr 15, 2009 3:19 pm

Guys
I know we are all doing different things; but I think 1 sec is too low, esp in running?
I dont use green up in play these days, but I remember that two times at about 5 secs was OK?
Regards
Peter
User avatar
Crazyskier
Posts: 1278
Joined: Sat Feb 06, 2016 6:36 pm

PeterLe wrote:Guys
I know we are all doing different things; but I think 1 sec is too low, esp in running?
I dont use green up in play these days, but I remember that two times at about 5 secs was OK?
Regards
Peter
I'm currently doing 3 times at 2 second intervals triggered at 7 seconds. Never fails.
Post Reply

Return to “Bet Angel - Automation”