Double backing

Please post any questions regarding the program here.

Moderator: 2020vision

Double backing

Postby eclipse » Mon May 21, 2012 2:03 pm

Hi all, I'm firing in some back bets in play with a fill/kill of 4 seconds in Excel. If it's not fully matched then then it clears the bet ref and fires in a new back bet. It uses the My_bets sheet to work out how much has been matched but occationally this is not showing the matched amount quickly enough so it's firing in a full bet again. Is there anyway to know that the My_bets sheet has been updated before firing in a new bet? Many thanks for any help.
User avatar
eclipse
 
Posts: 226
Joined: Mon Apr 16, 2007 10:54 am
Location: S. E. England

Postby alrodopial » Mon May 21, 2012 7:56 pm

I would also like to have a way with this as I also use the BACK-F1 trigger , (not using the My_bets sheet) and check if my bet was matched 1,5secs after the end of 1 sec but still there was one or two occations that I got that my bet was partially matched but it was actually fully matched.

Garry can you post how the bet reff changes ( number, number with P in end) when a back-f4 is triggered and when is partially matched,then partially matched again, then fully matced , partially matched at the end etc, ?

And of course how the my_bets sheet can be used for this as ecliple asked

Thanks
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Postby alrodopial » Wed May 23, 2012 10:06 pm

Garry/Mark, your help is needed here
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Re: Double backing

Postby GaryRussell » Thu May 24, 2012 10:29 am

eclipse wrote:Hi all, I'm firing in some back bets in play with a fill/kill of 4 seconds in Excel. If it's not fully matched then then it clears the bet ref and fires in a new back bet. It uses the My_bets sheet to work out how much has been matched but occationally this is not showing the matched amount quickly enough so it's firing in a full bet again. Is there anyway to know that the My_bets sheet has been updated before firing in a new bet? Many thanks for any help.

Are you checking the status column in MyBets? If the bet appears with status U then fill or kill hasn't completed. If it appears twice: once with status U and again with status F then it's too soon to check. If it only appears once with status F then it has completed and the matched amount has to be up to date, it cannot change after that. If it does not appear at all then it was completely killed. Therefore you should be checking for it not being present at all or once with status F to trigger your next bet.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby GaryRussell » Thu May 24, 2012 10:46 am

alrodopial wrote:I would also like to have a way with this as I also use the BACK-F1 trigger , (not using the My_bets sheet) and check if my bet was matched 1,5secs after the end of 1 sec but still there was one or two occations that I got that my bet was partially matched but it was actually fully matched.

Garry can you post how the bet reff changes ( number, number with P in end) when a back-f4 is triggered and when is partially matched,then partially matched again, then fully matced , partially matched at the end etc, ?

And of course how the my_bets sheet can be used for this as ecliple asked

Thanks


Unmatched, but not killed: bet ref without P appended and matched stake column is 0

Unmatched and killed: bet ref contains "CANCELLED"

Partially matched, but not killed: bet ref with P appended and stake column not 0

Partially matched and killed: bet ref without P and stake not 0, but less than requested stake

Fully matched: bet ref without P and stake equal to requested stake

Therefore you should only trigger another bet if "unmatched and killed" or "partially matched and killed"

but still there was one or two occations that I got that my bet was partially matched but it was actually fully matched

Were these bets triggered while the bet ref still had P appended?
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby eclipse » Thu May 24, 2012 10:58 am

I've been getting situations where the bet is fully matched but My_Bets is not updated fast enough to reflect this (I work out how much to back again based on the the amount matched in the My_Bets sheet), so my program is triggering another full back bet. Wondering if the 1 second delay in play is causing me problems.
User avatar
eclipse
 
Posts: 226
Joined: Mon Apr 16, 2007 10:54 am
Location: S. E. England

Postby GaryRussell » Thu May 24, 2012 1:14 pm

eclipse wrote:I've been getting situations where the bet is fully matched but My_Bets is not updated fast enough to reflect this (I work out how much to back again based on the the amount matched in the My_Bets sheet), so my program is triggering another full back bet. Wondering if the 1 second delay in play is causing me problems.

How are you checking MyBets? With a formula or with VBA? I think it would be better if a provided an example of how to check it.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby eclipse » Thu May 24, 2012 1:49 pm

I'm using an array formula to check the matched back bets, each area on the My_bets sheet being named.
{=IF($A5<>"",SUM(IF((SelectionP=$A5)*(MatchedP="F")*(TypeP="B"),StakeP*OddsP,0)),0)}

Normally works very well.
User avatar
eclipse
 
Posts: 226
Joined: Mon Apr 16, 2007 10:54 am
Location: S. E. England

Postby GaryRussell » Thu May 24, 2012 2:00 pm

Is the formula in a cell on the MyBets worksheet or the trigger worksheet?
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby eclipse » Thu May 24, 2012 2:07 pm

It's on the trigger worksheet.
User avatar
eclipse
 
Posts: 226
Joined: Mon Apr 16, 2007 10:54 am
Location: S. E. England

Postby alrodopial » Thu May 24, 2012 3:18 pm

GaryRussell wrote:Unmatched, but not killed: bet ref without P appended and matched stake column is 0

Unmatched and killed: bet ref contains "CANCELLED"

Partially matched, but not killed: bet ref with P appended and stake column not 0

Partially matched and killed: bet ref without P and stake not 0, but less than requested stake

Fully matched: bet ref without P and stake equal to requested stake



Thanks , exactly what I wanted
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Postby GaryRussell » Fri May 25, 2012 2:27 pm

eclipse wrote:I'm using an array formula to check the matched back bets, each area on the My_bets sheet being named.
{=IF($A5<>"",SUM(IF((SelectionP=$A5)*(MatchedP="F")*(TypeP="B"),StakeP*OddsP,0)),0)}

Normally works very well.

Am I missing something? If the bet is unmatched on the next refresh, but before the fill or kill has executed won't your formula indicate nothing is matched and trigger another bet?

For example.

Code: Select all
Seconds elapsed         Action
0                               BACK-F4
1                               New bet triggered because formula indicates unmatched
2                               First bet matched
4                               Fill or kill executes, but bet matched

Does your spreadsheet's logic assume that BACK-F4 (including waiting for 4 seconds and then attempting to cancel the bet) will complete before the next refresh?
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby eclipse » Fri May 25, 2012 2:47 pm

My trigger formula won't fire in a new bet until a 'CLEAR' has been fired first. It fires a CLEAR if bet fef indicates CANCELLED (killed) or if there is a bet ref but unmatched amount =0, it checks for amount unmatched too. If the amount matched is less than original stake then it fires a back bet in again. Sometimes it seems the MyBets sheet is lagging behind on showing the actual amount matched so it's firing in another bet before the true figure matched is appearing. Hope that makes sense lol.
User avatar
eclipse
 
Posts: 226
Joined: Mon Apr 16, 2007 10:54 am
Location: S. E. England

Postby GaryRussell » Sat May 26, 2012 7:09 am

eclipse wrote:My trigger formula won't fire in a new bet until a 'CLEAR' has been fired first. It fires a CLEAR if bet fef indicates CANCELLED (killed) or if there is a bet ref but unmatched amount =0, it checks for amount unmatched too. If the amount matched is less than original stake then it fires a back bet in again. Sometimes it seems the MyBets sheet is lagging behind on showing the actual amount matched so it's firing in another bet before the true figure matched is appearing. Hope that makes sense lol.

Yes, that gives me a better picture of what you are doing. Please leave it with me.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby GaryRussell » Tue May 29, 2012 2:22 pm

If the amount matched is less than original stake then it fires a back bet in again

Are you using the following logic?

If amount matched is greater than zero but less than original stake fire new bet. Determine the amount to place from MyBets.

There can be a lag due to the order that BA updates the spreadsheet. This is the order.

1. Update MyBets
2. Update odds and amounts offered.
3. Update matched odds and stakes on trigger worksheet.

It's possible that between updates 1 and 3 that more of the bet is matched. Checking that the amount matched is greater than zero does not guarantee that fill or kill has executed. You can safely use the amount from MyBets if there no entries present with status U. It cannot be wrong then.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Next

Return to Help

Who is online

Users browsing this forum: No registered users and 42 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.