Moderator: 2020vision
by Freefall » Thu May 07, 2009 9:02 pm
by Freefall » Thu May 07, 2009 9:17 pm
by Freefall » Thu May 07, 2009 10:38 pm
by barnov » Thu May 07, 2009 11:15 pm
' Declare Variables
Private MyMarket As String
Private RefreshCount As Long
Private BalLookup As Boolean
Private BalAvail As Double
Private BalExposure As Double
Private SubmitBetCount As Long
Dim WithEvents ba As BettingAssistantCom.ComClass
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
Call Market_Change 'check for new market and track refreshes
If RefreshCount > 3 Then
If SubmitBetCount > 0 Then GoTo LeaveRoutine
Call Lookup_Balance
If BalLookup = True Then GoTo LeaveRoutine
Call Submit_Bet
End If
Case 5 'bets update
Case 1 'refresh update
Case 8 'bet column headers update
Case Else
End Select
LeaveRoutine: 'simple marker
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
End Sub
Private Sub Market_Change()
'check to see if market has changed
If Worksheets("wsBA").Range("A1").Value = MyMarket Then
RefreshCount = RefreshCount + 1 'increase counter for each refresh
Else
MyMarket = Worksheets("wsBA").Range("A1").Value 'update MyMarket variable
' reset counters used elsewhere in routines
RefreshCount = 1
SubmitBetCount = 0
'clear contents of various ranges
Worksheets("wsBA").Range("Q5:X50").ClearContents
Worksheets("wsBA").Range("AC2:AE2").ClearContents
End If
End Sub
Private Sub Lookup_Balance()
startBal = Worksheets("wsBA").Range("Z2").Value 'define value - manual cell input
If ba Is Nothing Then
Set ba = New BettingAssistantCom.ComClass
End If
Set Bal = ba.getBalance(1)
BalAvail = Bal.availbalance 'set BalAvail value based on COM input
Worksheets("wsba").Range("AC2").Value = BalAvail 'record in target cell
BalExposure = Bal.exposure 'set BalExposure value based on COM input
Worksheets("wsba").Range("AD2").Value = BalExposure 'record in target cell
Shortfall = Worksheets("wsBA").Range("AB2").Value - BalAvail
Worksheets("wsBA").Range("AE2").Value = Shortfall
If BalAvail > startBal Then
BalLookup = True
Else
BalLookup = False
End If
End Sub
Private Sub Submit_Bet()
For Each bcell In Worksheets("wsba").Range("AD5:AD50")
If bcell.Value <> "" Then
bcell.Offset(0, -13).Value = "BACK"
bcell.Offset(0, -12).Value =
bcell.Offset(0, -11).Value =
End If
Next bcell
SubmitBetCount = SubmitBetCount + 1
End Sub
by barnov » Thu May 07, 2009 11:29 pm
If Worksheets("wsBA1").Range("AF2").Value > 35 Then GoTo LeaveRoutine
Call Submit_Bet
by Freefall » Thu May 07, 2009 11:41 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.