 
        	 
        	Moderator: 2020vision
 by diceman121 » Wed Oct 12, 2011 8:18 am
by diceman121 » Wed Oct 12, 2011 8:18 am 
 by osknows » Wed Oct 12, 2011 9:19 am
by osknows » Wed Oct 12, 2011 9:19 am 
ba.TabIndex = 1
result = ba.openMarket(BAEvents(.Range("AD2").Value).eventId, BAEvents(.Range("AD2").Value).exchangeId)
 by diceman121 » Wed Oct 12, 2011 8:17 pm
by diceman121 » Wed Oct 12, 2011 8:17 pm 
Private Sub ba_getMarketDepthComplete(ByVal MarketDepth As Variant, ByVal resultCode As String)
    On Error GoTo getMarketDepthCompleteError
    Dim prices As Variant
    Dim wsCells
    If Not IsEmpty(MarketDepth) And resultCode = "OK" Then
        Dim i As Integer, r As Integer, selecName As String, j As Integer, c As Integer, idx As Integer
        Dim backCount As Integer, layCount As Integer, rowCount As Integer
        r = 5
        Do
            selecName = Cells(r, 1).Value
            r = r + 1
        Loop Until selecName = ""
        rowCount = r - 6
        ReDim wsCells(rowCount - 1, 39) As Double
        r = 5
        Do
            selecName = Cells(r, 1).Value
            If selecName <> "" Then
                For i = 0 To UBound(MarketDepth)
                    If MarketDepth(i).Selection = selecName Then
                        backCount = -1
                        layCount = -1
                        prices = MarketDepth(i).prices
                        For j = 0 To UBound(prices)
                             If prices(j).backAmountAvailable > 0 Then
                                backCount = backCount + 1
                                ReDim Preserve backPrices(backCount)
                                Set backPrices(backCount) = prices(j)
                             End If
                             If prices(j).layAmountAvailable > 0 Then
                                layCount = layCount + 1
                                ReDim Preserve layPrices(layCount)
                                Set layPrices(layCount) = prices(j)
                             End If
                        Next
                        If backCount <> -1 Then
                            QuickSort backPrices
                            For c = 1 To 10
                                idx = backCount - (c - 1)
                                If idx <= UBound(backPrices) Then
                                    wsCells(r - 5, (c - 1) * 2) = backPrices(idx).odds
                                    wsCells(r - 5, ((c - 1) * 2) + 1) = backPrices(idx).backAmountAvailable
                                Else
                                    wsCells(r - 5, (c - 1) * 2) = 0
                                    wsCells(r - 5, ((c - 1) * 2) + 1) = 0
                                End If
                            Next
                        End If
                        If layCount <> -1 Then
                            QuickSort layPrices
                            For c = 1 To 10
                                idx = c - 1
                                If idx <= UBound(layPrices) Then
                                    wsCells(r - 5, ((c - 1) * 2) + 20) = layPrices(idx).odds
                                    wsCells(r - 5, ((c - 1) * 2) + 21) = layPrices(idx).layAmountAvailable
                                Else
                                    wsCells(r - 5, ((c - 1) * 2) + 20) = 0
                                    wsCells(r - 5, ((c - 1) * 2) + 21) = 0
                                End If
                            Next
                        End If
                        Exit For
                   End If
                Next
            End If
            r = r + 1
        Loop Until selecName = ""
        Range([Z5], Cells(5 + (rowCount - 1), 65)) = wsCells
    End If
getMarketDepthCompleteError:
End Sub by osknows » Wed Oct 12, 2011 9:26 pm
by osknows » Wed Oct 12, 2011 9:26 pm 
Private Sub ba_getMarketDepthComplete(ByVal MarketDepth As Variant, ByVal resultCode As String, byval WS as worksheet) With WS
  selecName = .Cells(r, 1).Value
  
  
  
  .Range([Z5], Cells(5 + (rowCount - 1), 65)) = wsCells 
end with
 by diceman121 » Thu Oct 13, 2011 12:04 am
by diceman121 » Thu Oct 13, 2011 12:04 am 
 by diceman121 » Thu Oct 13, 2011 8:51 am
by diceman121 » Thu Oct 13, 2011 8:51 am 
 by osknows » Thu Oct 13, 2011 10:53 am
by osknows » Thu Oct 13, 2011 10:53 am 

 by diceman121 » Thu Oct 13, 2011 11:24 am
by diceman121 » Thu Oct 13, 2011 11:24 am 
 by osknows » Thu Oct 13, 2011 12:10 pm
by osknows » Thu Oct 13, 2011 12:10 pm 

 by alrodopial » Sun Feb 12, 2012 10:10 am
by alrodopial » Sun Feb 12, 2012 10:10 am 
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.


