inplay timer

Find a developer for your Excel triggered betting needs and advertise your development service here.

Moderator: 2020vision

inplay timer

Postby mrcelebrity » Tue Feb 02, 2010 2:34 pm

Hi I'm just wondering if its possible to utilise the "in play timer" when making an excel trigger or bot. For example say I want to cancel all my bets when the in play timer reaches 1 minute

Thanks
mrcelebrity
 
Posts: 1
Joined: Tue Feb 02, 2010 2:29 pm

Postby silver » Tue Feb 02, 2010 3:42 pm

There is some code created by Gary posted at the bottom of this thread which will do what you want:

http://www.gruss-software.co.uk/forum/v ... play+timer

____________________


Alternatively, if you wanted to create an In Play timer using only formulas rather than VBA code, it can be done as follows. The W3 formula below was posted by Gary if I recall correctly. I have a feeling that I got the overall structure from another site about Excel.

I use cells T3, U3, V3 and W3 for this:

In T3. =IF($E$2="In Play","In Play","")

In U3. =IF(T3="","",IF(U3="",NOW(),U3))

In V3. =IF($E$2="In Play",NOW()-U3,0)

In W3 =IF(LEFT(V3)<>"-",(HOUR(V3)*3600)+(MINUTE(V3)*60)+SECOND(V3),-((HOUR(SUBSTITUTE(V3,"-",""))*3600)+(MINUTE(SUBSTITUTE(V3,"-",""))*60)+SECOND(SUBSTITUTE(V3,"-",""))))

I think you'll need to enable iterative calculations for this to work.

I have cells T3 and W3 formatted as General and cells U3 and V3 formatted as Time HH:MM:SS.

When the event goes in play, cell W3 should count in seconds from 1 upwards as time passes.

__________________

If you are able to employ the code from the thread posted above, it is arguably superior in a number of ways, but perhaps it's useful to see how it can be done using formulas too.



Silver
silver
 
Posts: 42
Joined: Thu Sep 03, 2009 10:50 am

Postby MarkRussell » Tue Feb 02, 2010 3:45 pm

Hi,

You can monitor for when the market is turned in play, start your timer, and use the CANCEL-ALL trigger to cancel all unmatched bets when the timer reaches 1 minute.

It will be accurate to the refresh rate that you have set, e.g. if you had a refresh of 10 seconds and the market is turned in play just after your last refresh it will be 10 seconds before your sheet knows it has turned in play.

Mark
User avatar
MarkRussell
Site Admin
 
Posts: 1787
Joined: Tue Feb 20, 2007 6:38 pm
Location: Birmingham


Return to Find an Excel developer

Who is online

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