Help with some code

Please post any questions regarding the program here.

Moderator: 2020vision

Help with some code

Postby Revol82 » Fri Jan 27, 2012 6:58 pm

I have some vba code that constantly observes the market, but i want it to stop after the lay bet. how can i do it?
Example: Over 2,5 goals, the bot puts a back bet when it reaches 2.5 let's say a goal is scored and the odd goes to 1.5 then the bot places the lay bet.
After this i want it to stop observing the market for it not to place another back bet in case it reaches again 2.5.

Ty
Revol82
 
Posts: 8
Joined: Fri May 27, 2011 11:55 pm

Postby Captain Sensible » Fri Jan 27, 2012 9:45 pm

Just set a flag in your code after the laybet is placed, for eaxmple set it to 1 and amend the original back bet routine to add another criteria meaning it will only fire when the flag isn't 1
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby Revol82 » Sat Jan 28, 2012 1:00 pm

Ty, true, wanst thinking :oops:

If Sheet3.Range("D2").Value = "00:30:00"

How can i put this code to work? it doesnt recognize the value 00:30:00
Revol82
 
Posts: 8
Joined: Fri May 27, 2011 11:55 pm

Postby Captain Sensible » Sat Jan 28, 2012 2:50 pm

Revol82 wrote:Ty, true, wanst thinking :oops:

If Sheet3.Range("D2").Value = "00:30:00"

How can i put this code to work? it doesnt recognize the value 00:30:00


Excel treats time as a numerical value rather than text, you can use ,

If Sheet3.Range("D2").Value =TIMEVALUE("00:30:00")

or even the numerical value for 00:30:00

If Sheet3.Range("D2").Value = 0.0208333333

Might also be worth you using greater than , less than 00:30:00 or even a range of times in your coding as it's easy to miss a set time slot, only need a slow refresh for a set time to be missed
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm


Return to Help

Who is online

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