Moderator: 2020vision
by danjuma » Wed May 06, 2009 3:17 pm
by danjuma » Thu May 07, 2009 12:26 am
by jokerjoe » Thu May 07, 2009 9:29 am
Sub Reset_Lay()
'
' Reset_Lay Macro
'
' Keyboard Shortcut: Ctrl+r
'
Range("Q5:T50").ClearContents
Range("S5").Formula = "=IF(F5<>"""",$AD$6,"""")"
Range("S5").AutoFill Destination:=Range("S5:S50"), Type:=xlFillDefault
Range("R5").Formula = "=IF(F5<>"""",F5,"""")"
Range("R5").AutoFill Destination:=Range("R5:R50"), Type:=xlFillDefault
Range("Q5").Formula = "=IF(AND(F5<>"""",F5<=2,AB5=1,$AD$20=3,E2<>""In Play"",NOT(ISNUMBER(MATCH(F5,ExHorses!A2:A100,0)))),""BET"","""")"
Range("Q5").AutoFill Destination:=Range("Q5:Q50"), Type:=xlFillDefault
End Sub
Sub Back()
'
' Back Macro
'
' Keyboard Shortcut: Ctrl+b
'
Range("Q5:T50").ClearContents
Range("S5").Formula = "=IF(F5<>"""",(V5/$AD$8)*W5,"""")"
Range("S5").AutoFill Destination:=Range("S5:S50"), Type:=xlFillDefault
Range("R5").Formula = "=IF(F5<>"""",$AD$8,"""")"
Range("R5").AutoFill Destination:=Range("R5:R50"), Type:=xlFillDefault
Range("Q5").Formula = "=IF(AND(F5<>"""",$AD$12=1,F5<2,Z5=1),""BACK"","""")"
Range("Q5").AutoFill Destination:=Range("Q5:Q51"), Type:=xlFillDefault
End Sub
Private MyMarket As String
Private Layed As Boolean
Private InPlay As Boolean
Private InPlayTimer As Single
Private RefreshCount As Long
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
Select Case Target.Columns.Count
Case 16 'odds and market info update
'check to see if market changed
If wsBA.Range("A1").Value = MyMarket Then
RefreshCount = RefreshCount + 1
Else
MyMarket = wsBA.Range("A1").Value
RefreshCount = 1
Layed = False
InPlay = False
End If
'waits 2 refreshes, lays if not in play or already layed
If RefreshCount > 3 And Range("E2") = "Not In Play" And Range("F2") <> "Suspended" _
And Not (Layed) Then
Call Reset_Lay
Layed = True
End If
'checks if in play
If Not (InPlay) Then
If Range("E2") = "In Play" Then
InPlay = True
InPlayTimer = Timer
End If
End If
'checks if market's been in play for more than 10 seconds, and a lay has been triggered
If InPlay And Timer - InPlayTimer > 10 And Layed Then
Call Back
End If
Case 5 'bets update
Case Else
End Select
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
End Sub
by danjuma » Thu May 07, 2009 9:47 am
by danjuma » Sat May 09, 2009 6:06 pm
by jokerjoe » Sat May 09, 2009 6:36 pm
by danjuma » Sun May 10, 2009 6:39 pm
by jokerjoe » Mon May 11, 2009 10:08 am
Private MyMarket As String
Private Layed As Boolean
Private InPlay As Boolean
Private InPlayTimer As Single
Private RefreshCount As Long
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
Select Case Target.Columns.Count
Case 16 'odds and market info update
'check to see if market changed
If Range("A1").Value = MyMarket Then
RefreshCount = RefreshCount + 1
Else
MyMarket = Range("A1").Value
RefreshCount = 1
Layed = False
InPlay = False
End If
'waits 2 refreshes, lays if not in play or already layed
If RefreshCount > 3 And Range("E2") = "Not In Play" And Range("F2") <> "Suspended" _
And Not (Layed) Then
Call Reset_Lay(Target)
Layed = True
End If
'checks if in play
If Not (InPlay) Then
If Range("E2") = "In Play" Then
InPlay = True
InPlayTimer = Timer
End If
End If
'checks if market's been in play for more than 10 seconds, and a lay has been triggered
If InPlay And Timer - InPlayTimer > 10 And Layed Then
Call Back(Target)
End If
Case 5 'bets update
Case Else
End Select
If updating Then Exit Sub
updating = True
If Cells(2, 5) = "In Play" Then
If Cells(1, 27) = "" Then Cells(1, 27) = Cells(2, 3)
If Cells(1, 27) <> "" Then Cells(1, 28) = DateDiff("s", Cells(1, 27), Cells(2, 3))
End If
If Cells(2, 5) <> "In Play" And Cells(2, 6) <> "Suspended" Then
Cells(1, 27) = ""
Cells(1, 28) = ""
End If
updating = False
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
Sub Reset_Lay(ByRef Target As Range)
'
' Reset_Lay Macro
'
' Keyboard Shortcut: Ctrl+r
'
With Target.Worksheet
.Range("Q5:T50").ClearContents
.Range("S5").Formula = "=IF(F5<>"""",$AD$6,"""")"
.Range("S5").AutoFill Destination:=.Range("S5:S50"), Type:=xlFillDefault
.Range("R5").Formula = "=IF(F5<>"""",F5,"""")"
.Range("R5").AutoFill Destination:=.Range("R5:R50"), Type:=xlFillDefault
.Range("Q5").Formula = "=IF(AND(F5<>"""",F5<=2,AB5=1,$AD$20=3,E2<>""In Play"",NOT(ISNUMBER(MATCH(F5,ExHorses!A2:A100,0)))),""BET"","""")"
.Range("Q5").AutoFill Destination:=.Range("Q5:Q50"), Type:=xlFillDefault
End With
End Sub
Sub Back(ByRef Target As Range)
'
' Back Macro
'
' Keyboard Shortcut: Ctrl+b
'
With Target.Worksheet
.Range("Q5:T50").ClearContents
.Range("S5").Formula = "=IF(F5<>"""",(V5/$AD$8)*W5,"""")"
.Range("S5").AutoFill Destination:=.Range("S5:S50"), Type:=xlFillDefault
.Range("R5").Formula = "=IF(F5<>"""",$AD$8,"""")"
.Range("R5").AutoFill Destination:=.Range("R5:R50"), Type:=xlFillDefault
.Range("Q5").Formula = "=IF(AND(F5<>"""",$AD$12=1,F5<2,Z5=1),""BACK"","""")"
.Range("Q5").AutoFill Destination:=.Range("Q5:Q51"), Type:=xlFillDefault
End With
End Sub
by danjuma » Mon May 11, 2009 6:25 pm
by jokerjoe » Mon May 11, 2009 8:30 pm
by danjuma » Thu May 14, 2009 4:12 pm
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.