ba.Placebet when in-running time delay

Please post any questions regarding the program here.

Moderator: 2020vision

ba.Placebet when in-running time delay

Postby lanips » Sun Jun 10, 2012 12:31 pm

Hi

I have some VBA code that loops through a number of football selections and places bets according to liability controls. The placebet function is the standard one shown below

Backref(i) = ba.placebet(BetID, "B", Odds(i, 1), BackStake)

This works fine pre match but crashes in-play presumably as the function has to wait 3-8 seconds for a bet reference from Betfair and so delays returning a function result.

Is there anyway around this? I'm a novice with VBA and tried

"On Error resume Next"

in the hope to crudely ignore the error but this doesn't work.

Any ideas much appreciated.

Thanks

Max
lanips
 
Posts: 3
Joined: Fri Aug 26, 2011 1:10 pm

Postby GaryRussell » Mon Jun 11, 2012 6:55 am

The statement would just take longer to execute in play as you say, but I don't understand how this can cause your code to crash. What error message does it generate?
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby lanips » Sat Jun 16, 2012 12:04 pm

Thanks for your response.

Sorry, a bit misleading as no actual error message, just "egg timing" until each bet has gone up on Betfair.

There are 2 issues.

1) I am trying to place two bets, back and lay, in-play on several markets simultaneously. The For loop I currently use means that each market takes 3-8 seconds to go up before the next market is processed. Is there any way to put up multiple bets at the same time to only have to face one Betfair in-running time delay?

My non COM version seems to allow this but I have to wait for all Backs (or Lays) to go up before placing the Lays (or Backs) as you can only put one command in the trigger cell at a time.

2) The in-play time delay causes the code to egg time. I am trying to give control back to Excel with DoEvents so my prices can decay but with no success.

Thanks again for your response.

Cheers

Max
lanips
 
Posts: 3
Joined: Fri Aug 26, 2011 1:10 pm


Return to Help

Who is online

Users browsing this forum: Google [Bot] and 18 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.