Cancel all bets after first bet is matched

Please post any questions regarding the program here.

Moderator: 2020vision

Cancel all bets after first bet is matched

Postby sjaak1943 » Wed Jul 28, 2010 8:11 am

I use P/L column (X) for this. When I run more workbooks at the same time, you can't use this. Who knows another solution?

=IF(AND($E$2="Not in Play";R5=$H$53;S5=$H$54;"LAY-IP";IF($X$1<>0;"CANCEL-ALL"))

Sjaak
sjaak1943
 
Posts: 174
Joined: Tue Oct 31, 2006 9:50 pm
Location: Schagen, the Netherlands

Postby GaryRussell » Wed Jul 28, 2010 8:45 am

Do you mean it doesn't work because you are using multiple workbooks for the same race?
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby sjaak1943 » Wed Jul 28, 2010 9:07 am

GaryRussell wrote:Do you mean it doesn't work because you are using multiple workbooks for the same race?


Yes, when you use one workbook, the sum of P/L column change from 0 to whatever when a bet is matched. So I can't use this when in another workbook with the same market a bet is matched.
Hope I'm clear.

Sjaak
sjaak1943
 
Posts: 174
Joined: Tue Oct 31, 2006 9:50 pm
Location: Schagen, the Netherlands

Postby GaryRussell » Wed Jul 28, 2010 9:13 am

I thought so. You could use the matched stake column. For example:-

Put =sum(W5:W49) in cell W50.

Change your formula as follows.
=IF(AND($E$2="Not in Play";R5=$H$53;S5=$H$54;"LAY-IP";IF($W$50>0;"CANCEL-ALL"))
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby sjaak1943 » Wed Jul 28, 2010 9:24 am

GaryRussell wrote:I thought so. You could use the matched stake column. For example:-

Put =sum(W5:W49) in cell W50.

Change your formula as follows.
=IF(AND($E$2="Not in Play";R5=$H$53;S5=$H$54;"LAY-IP";IF($W$50>0;"CANCEL-ALL"))


Thanks Gary, so column W (matched stake) cannot change from another workbook with the same race?

Sjaak
sjaak1943
 
Posts: 174
Joined: Tue Oct 31, 2006 9:50 pm
Location: Schagen, the Netherlands

Postby GaryRussell » Wed Jul 28, 2010 9:47 am

Thanks Gary, so column W (matched stake) cannot change from another workbook with the same race?

Not if they are different bets. Column W contains the matched stake for the bet ref in column T.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby excelhasey » Fri Aug 06, 2010 12:30 pm

What does R5=$H$53;S5=$H$54 do ??
excelhasey
 
Posts: 196
Joined: Sat May 22, 2010 4:57 pm
Location: North West

Postby excelhasey » Fri Aug 06, 2010 1:21 pm

I used

=IF(AND(R5>0,S5>0,$S$1<=500,A5<>"",$F$2<>"Suspended",$F$2<>"Closed",$E$2="Not In Play"),"LAY-PL2",IF($AC$2>0,"CANCEL-ALL"))

AC2 being the Min of column X

But when all runners in the race went Green I still had 3 outstanding Unmatched bets that where not Cancelled and I had to manually do this within BA - why, what did I do wrong ??
excelhasey
 
Posts: 196
Joined: Sat May 22, 2010 4:57 pm
Location: North West

Postby GaryRussell » Fri Aug 06, 2010 2:59 pm

X is the profit and loss column. Are you confusing it with the level profit column? The P&L column will not change to show that a level profit is available, it will stay showing your current P&L. When you say 'the race went green' it would not have changed because a level profit is available.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby GaryRussell » Fri Aug 06, 2010 3:02 pm

excelhasey wrote:What does R5=$H$53;S5=$H$54 do ??


This will be specific to their spreadsheet. Only they will know. It's not the output from Betting Assistant.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby excelhasey » Fri Aug 06, 2010 3:07 pm

Yes I know X is profit / loss as your matched bets currently stand (as it would show you in Betfair itself against the selection).

Sorry I have conditionally formatted my X column to go Green if above zero and Red if below, hence I had an all green situation, its nothing to do with BA's ability to show you if there is a level profit available

The bets that had been matched at that time, in my race, must have equated to me having a green book as they were all positive but I still had other bets unmatched in the system that I wanted to be automatically cancelled, obviously I have not written this correctly for Excel / Betfair to understand

So how should I have written my trigger ??
excelhasey
 
Posts: 196
Joined: Sat May 22, 2010 4:57 pm
Location: North West

Postby GaryRussell » Fri Aug 06, 2010 3:28 pm

I am guessing that CANCEL-ALL never appeared in column Q.

Are you sure that all the conditions to put "LAY-PL2" weren't still satisfied? Your formula is only putting CANCEL-ALL in column Q if these conditions are not satisfied and AC2>0.

Maybe your could change your formula to read as follows so that if the P&L is green then the bets are cancelled otherwise the trigger is evaluated.
Code: Select all
=IF($AC$2>0,"CANCEL-ALL",IF(AND(R5>0,S5>0,$S$1<=500,A5<>"",$F$2<>"Suspended",$F$2<>"Closed",$E$2="Not In Play"),"LAY-PL2",""))
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby excelhasey » Fri Aug 06, 2010 3:33 pm

Thanks Gary,

If you have a Lay bet matched on a particular horse and a corresponding Back bet in the system unmatched on the same selection (due to LAY-PL2) will the 2nd bit of the bet, the Back bet, be cancelled or will it only automatically cancel bets on the selections that have not yet had the the 1st bit of the bet, the Lay bet, matched ??
excelhasey
 
Posts: 196
Joined: Sat May 22, 2010 4:57 pm
Location: North West

Postby GaryRussell » Fri Aug 06, 2010 3:37 pm

It will cancel the unmatched back bet that has already been placed and cancel all offset bets that have not yet been placed.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK


Return to Help

Who is online

Users browsing this forum: Bing [Bot] and 35 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.