negative time values problems

Please post any questions regarding the program here.

Moderator: 2020vision

negative time values problems

Postby josthkko » Wed May 19, 2010 1:19 am

I have set up a bot that stops betting 20 seconds before the off. But when the timer goes to negative values it starts betting again. Why does that happen? How could i avoid it?
Any help appreciated!
josthkko
 
Posts: 11
Joined: Thu Feb 25, 2010 5:42 pm

Postby GaryRussell » Wed May 19, 2010 5:53 am

Without seeing what logic you are using to determine when it is 20 seconds before the off it's impossible to say why it continues betting. I can only tell you how I do it. I use the following formula to calculate seconds before the off.
Code: Select all
=IF(LEFT(D2)<>"-",(HOUR(D2)*3600)+(MINUTE(D2)*60)+SECOND(D2),-((HOUR(SUBSTITUTE(D2,"-",""))*3600)+(MINUTE(SUBSTITUTE(D2,"-",""))*60)+SECOND(SUBSTITUTE(D2,"-",""))))

This formula will calculate a negative value after the scheduled off so you just need to check it is >=20
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby Captain Sensible » Wed May 19, 2010 8:27 am

You could also just include an AND statement within your code to check for a negative time and use that to avoid betting

=IF(AND(LEFT(D2)<>"-",any other criteria),"bet","no bet")
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby josthkko » Wed May 19, 2010 9:16 am

Yes, thank you both! Exactly what i was looking for :D
josthkko
 
Posts: 11
Joined: Thu Feb 25, 2010 5:42 pm

Postby crocogotter » Fri Apr 08, 2011 3:34 pm

Captain Sensible wrote:You could also just include an AND statement within your code to check for a negative time and use that to avoid betting

=IF(AND(LEFT(D2)<>"-",any other criteria),"bet","no bet")


All hail the search function. Exactly what I wanted, as for some reason I was also having a problem once the scheduled start time had passed but the event wasn't yet in play; for some reason a negative number wasn't deemed to be <0????

New to Gruss, and to Excel, so not ventured into macros and stuff just yet but managing with logical arguments in the main, having fun and learning lots.

Thanks Captain.
crocogotter
 
Posts: 57
Joined: Fri Apr 08, 2011 2:27 pm


Return to Help

Who is online

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