Cancel all unmatched bets every 5 seconds

Please post any questions regarding the program here.

Moderator: 2020vision

Cancel all unmatched bets every 5 seconds

Postby JohnMeyer9999 » Wed Sep 27, 2006 9:55 pm

Hi i have a system basically undercutting the betfair overround. What i am trying to do is place a lay bet on each selection in a race at odds that are better than currently available. Ie odds are available to back at 4.3, so i see that as soemone is willing to lay it at that price. I therefore better that lay by a percentange so that i now offer the best price available to back, so in this case Lay at 4.5 say.

I do thi for every selection and hopefully they will be matched. Every 5 seconds or so i want to cancel all my unmatched bets and then resubmit them at odds that are now the best,

Eg

Best price currently 4.3 Tried to lay at 4.5, wasnt matched, price drifts to 5. Therefore i want to cancel my lay at 4.5 bet and then lay at 5.2.
What excel function could i use to do this???

General function i want is: Every 5 seconds cancel all bets: Any ideas. Please Help
JohnMeyer9999
 
Posts: 6
Joined: Wed Sep 27, 2006 1:06 pm

Postby GeorgeUK » Wed Sep 27, 2006 10:49 pm

For this it would be for easier to use a macro to remember when the last time it ran was.

something like

sub macro1()

application.ontime now + timevalue("00:00:05"), "macro1"

'enter code to cancel all bets and put in the new odds + stakes

'** There may be a problem if a bet is pending. Might need an IF command to make the ontime part wait
end sub

Basically the ontime command is saying in 5 seconds, run the macro named "macro1"
which is the current macro

This will run indefinately so you will need an IF statement to escape it when the race has gone inplay or suspended.
previously known as Gaseous (on the betfair forum)
User avatar
GeorgeUK
 
Posts: 315
Joined: Sat Nov 19, 2005 10:18 pm
Location: Scotland

Postby Mitch » Wed Sep 27, 2006 11:09 pm

I'm sure you know what you're doing, and I'm probably misunderstanding, but unless there is a big overround to start with aren't you going to end up with an underround book if all your lays get matched?
User avatar
Mitch
 
Posts: 365
Joined: Sat Nov 19, 2005 12:28 am
Location: Leicester

Running out of overround

Postby JohnMeyer9999 » Thu Sep 28, 2006 11:42 am

That is an issue so basicaly stops when there is no more overround available., but takes into account odds thati have previously matched and then uses those to see if there is an overround avilable, If an overound doesnt exists it cancels the bet but thats why i need this command to cancle all unmatched and resubmit new bets at the new best odds available.

Can you explain the use of the the macro form withing the if stasemtn as i dont see hw it works, ie

=IF( x, y, x)

Will have a good look myself but if anyone know the answer will save me a bit of time.

When its all finsihed will post the completed sheet to show you how it all works

Thanks
JohnMeyer9999
 
Posts: 6
Joined: Wed Sep 27, 2006 1:06 pm

no overround

Postby JohnMeyer9999 » Thu Sep 28, 2006 11:45 am

Plus i use this to set upo odds early in Dog racing and then follow tyhe odds in, so in theory I 'm always providing the best odds available at any one time so as long as an overound exists i will get all my lasy matched but people looking to back at the best odds.

Ideally getting all the bets matched with an overound just like abookie but with not such a big overround??

Hopefully!!!!!!
JohnMeyer9999
 
Posts: 6
Joined: Wed Sep 27, 2006 1:06 pm

Postby Mitch » Thu Sep 28, 2006 7:00 pm

What refresh rate do you use John?

Could you post an example of the formulas you have in the Trigger, Odds, and Stake column without giving any secrets away?
User avatar
Mitch
 
Posts: 365
Joined: Sat Nov 19, 2005 12:28 am
Location: Leicester

Sorted

Postby JohnMeyer9999 » Fri Sep 29, 2006 2:10 pm

Thanks for all your advice everyone, I have sorted it. Fotr anyone else looking to carry out this function i used the clock that is streamed from Bet Assistant and then the =SECOND(Cell of CLock) in A1 of a separate sheet to get a counter cycling from 0 to 59 in Cell A1

I then used an if statementn saying =IF(A1=10,CANCEl,IF(A1=20,CANCEL,IF(A1=30 etc,CANCEL,LAY)

This function then puts the word CAncel in every 10 seconds throughtout a minute range and the starts again.

You can therefore set the parameter to CANCEL all bets whenever you want and whatever frequency you choose.

I would however reccommend you kleave the cance for 3 secs tho, ie 10 11 12 and then 20 21 22 etc so as to make sure all your bets cancel out.

Cheers

John
JohnMeyer9999
 
Posts: 6
Joined: Wed Sep 27, 2006 1:06 pm

Postby JohnMeyer9999 » Fri Sep 29, 2006 2:11 pm

use 0.5 sec refresh just so i have the most accu=rate data possible for my odds to change
JohnMeyer9999
 
Posts: 6
Joined: Wed Sep 27, 2006 1:06 pm


Return to Help

Who is online

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