Delay trigger InPlay

Please post any questions regarding the program here.

Moderator: 2020vision

Delay trigger InPlay

Postby Optimus_Primed » Thu Sep 20, 2012 11:41 am

Hi all,

I do most of my trading in play and i was wondering is there a way for your trigger to 'wait' for a certain amount of seconds before firing?

For example i want to back a horse 20 seconds after going in play, then if not matched in say 5 seconds - cancel bet.

Now i know how to trigger the last two things (BACK-F5-IP), but i don't want to fire in straight away.

Cheers for any help.
Optimus_Primed
 
Posts: 14
Joined: Fri Jun 08, 2012 6:55 am

Postby lindemann » Thu Sep 20, 2012 12:07 pm

Optimus,

I'm not a VBA expert but I can copy and paste with the best of them. This piece of code (written by Gary I think) puts time in play into Cell T1 so you can trigger your bets using =IF(T1>20,.......etc



Dim timeInPlay As Date
Dim turnedInPlay As Boolean

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
If Range("E2").Value = "In Play" Then
If Not turnedInPlay Then
turnedInPlay = True
timeInPlay = Now
End If
Else
turnedInPlay = False
End If
If turnedInPlay Then Range("T1").Value = DateDiff("s", timeInPlay, Now) Else Range("T1").Value = 0
End If
End Sub
lindemann
 
Posts: 70
Joined: Sun Feb 19, 2006 12:39 pm

Postby Optimus_Primed » Thu Sep 20, 2012 1:19 pm

lindemann wrote:Optimus,

I'm not a VBA expert but I can copy and paste with the best of them. This piece of code (written by Gary I think) puts time in play into Cell T1 so you can trigger your bets using =IF(T1>20,.......etc


Looks like exactly what i was after - will test it out tomorrow - thanks heaps lindermann
Optimus_Primed
 
Posts: 14
Joined: Fri Jun 08, 2012 6:55 am

Postby Optimus_Primed » Sat Sep 22, 2012 11:32 am

Tested and worked perfectly - thanks again
Optimus_Primed
 
Posts: 14
Joined: Fri Jun 08, 2012 6:55 am


Return to Help

Who is online

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