Cancelling a bet In Play

Please post any questions regarding the program here.

Moderator: 2020vision

Cancelling a bet In Play

Postby excelhasey » Tue Jun 29, 2010 4:05 pm

If you have a BACK or LAY trigger in EXCEL but its criteria has not been met before certain conditions have been met how do you get EXCEL to automatically cancel this bet ??
excelhasey
 
Posts: 196
Joined: Sat May 22, 2010 4:57 pm
Location: North West

Postby GaryRussell » Tue Jun 29, 2010 4:11 pm

When you say "critera has not been met" are you saying the bet hasn't actually been placed yet or are you talking about an unmatched bet. If it's an unmatched bet then you can use the CANCEL trigger.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby excelhasey » Tue Jun 29, 2010 4:32 pm

The bets are being placed but remain unmatched, for example I wanted to LAY all under 10.0, so what happened it was at something like 7.2 when I placed it and it remained unmatched until it steamed in and someone got a great bargain, which was not what I intended !!!!!

So really I wanted to LAY it within EXCEL and if it isn't taken after say 20 secs ($T$1) then CANCEL, so I wrote this but it didn't trigger in my last race :-

=IF(AND(R5>0,S5>0,A5<>"",$S$1<=0,$T$1<=20,F5<=$AS$2,$F$2<>"Suspended",$E$2="In Play",$F$2<>"Closed"),"LAY",IF(AND(R5>0,S5>0,A5<>"",$S$1<=0,$T$1>=30,F5<=$AS$2,$F$2<>"Suspended",$E$2="In Play",$F$2<>"Closed"),"CANCEL","")

Point 2 - Also earlier today I was trying a LAY when $T$1 (time in play) was between -1 and 11 but in laid before we got In Play, gutted cos I lost then too - Any ideas ?? - Even if $T$1 is blank due to the selections being auto re-freshed 1 min before the off and the race not yet being In Play then the trigger should not have been activated should it ??
excelhasey
 
Posts: 196
Joined: Sat May 22, 2010 4:57 pm
Location: North West

Postby GaryRussell » Tue Jun 29, 2010 4:45 pm

So really I wanted to LAY it within EXCEL and if it isn't taken after say 20 secs ($T$1) then CANCEL, so I wrote this but it didn't trigger in my last race :-

You can use fill or kill: "LAY-F20" will cancel the bet if not matched after 20 seconds. You don't need to use the "CANCEL" trigger then.

I'm afraid I have no idea how it could have placed a bet before it went in play because part of your criteria is $E$2="In Play". I am certain that $E$2 cannot show "In Play" unless Betfair's API indicates that it is in play. The only way it could happen is if it was turned in play for a moment by mistake.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby excelhasey » Tue Jun 29, 2010 5:00 pm

Cheers Gary,

Will the unmatched bet get cancelled after 20 secs, if so, is my trigger simply :-

=IF(AND(R5>0,S5>0,A5<>"",F5<=$AS$2,$F$2<>"Suspended",$E$2="In Play",$F$2<>"Closed"),"LAY-F20","")

Then would the Bet Ref and Bet Time would also then be removed ??

I am worried that it will then trigger another LAY bet, as all boxes will be unfilled, how do I ensure that doesn't happen ??
excelhasey
 
Posts: 196
Joined: Sat May 22, 2010 4:57 pm
Location: North West

Postby GaryRussell » Tue Jun 29, 2010 5:11 pm

excelhasey wrote:Cheers Gary,

Will the unmatched bet get cancelled after 20 secs, if so, is my trigger simply :-

=IF(AND(R5>0,S5>0,A5<>"",F5<=$AS$2,$F$2<>"Suspended",$E$2="In Play",$F$2<>"Closed"),"LAY-F20","")

Then would the Bet Ref and Bet Time would also then be removed ??

I am worried that it will then trigger another LAY bet, as all boxes will be unfilled, how do I ensure that doesn't happen ??

Yes it will cancel the bet if unmatched after 20 seconds. When the bet is cancelled the bet ref column will contain "CANCELLED". It will not continue to place more bets.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby excelhasey » Tue Jun 29, 2010 5:22 pm

Yes tried it that works as you say

Now last pester for today :-

One of my original criteria was that the LAY bet did not involve the FAV (or RANK 1), so this row remains empty, when bets originally placed, but In Play if this drifts out to 2nd Fav my current set up would LAY it and then it could return to Fav In Play and steam in but I have already laid it, I think this is what might have happened earlier today, so how would you suggest I can protect myself from this ??
excelhasey
 
Posts: 196
Joined: Sat May 22, 2010 4:57 pm
Location: North West

Postby GaryRussell » Tue Jun 29, 2010 5:41 pm

Is the criteria the same for every runner so that the criteria is met on the same refresh? If it is then you could use COUNTA to count the none blank cells in column T. eg. put "=COUNTA(T5:T50)" in cell U1. You can then use cell U1 in your criteria, ie. only trigger bets if cell U1=0
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], Google [Bot] and 30 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.