Moderator: 2020vision
by dgs2001 » Thu Oct 16, 2008 6:43 pm
by alrodopial » Thu Oct 16, 2008 10:25 pm
dgs2001 wrote:Hi All
I have been experimenting with Gary's PlusTick() MinusTick() code from another thread
by dgs2001 » Thu Oct 16, 2008 10:43 pm
by dgs2001 » Thu Oct 16, 2008 10:45 pm
by dgs2001 » Mon Oct 20, 2008 6:21 pm
Option Explicit
Function getOddsStepUp(ByVal odds As Currency) As Currency
Dim oddsInc As Currency
Select Case odds
Case 1 To 1.99
oddsInc = 0.01
Case 2 To 2.98
oddsInc = 0.02
Case 3 To 3.95
oddsInc = 0.05
Case 4 To 5.9
oddsInc = 0.1
Case 6 To 9.8
oddsInc = 0.2
Case 10 To 19.5
oddsInc = 0.5
Case 20 To 29
oddsInc = 1
Case 30 To 48
oddsInc = 2
Case 50 To 95
oddsInc = 5
Case 100 To 1000
oddsInc = 10
End Select
getOddsStepUp = oddsInc
End Function
Function getOddsStepDown(ByVal odds As Currency) As Currency
Dim oddsInc As Currency
Select Case odds
Case 1.01 To 2
oddsInc = 0.01
Case 2.02 To 3
oddsInc = 0.02
Case 3.05 To 4
oddsInc = 0.05
Case 4.1 To 6
oddsInc = 0.1
Case 6.2 To 10
oddsInc = 0.2
Case 10.5 To 20
oddsInc = 0.5
Case 21 To 30
oddsInc = 1
Case 32 To 50
oddsInc = 2
Case 55 To 100
oddsInc = 5
Case 110 To 1000
oddsInc = 10
End Select
getOddsStepDown = oddsInc
End Function
Function getTicks(odds1 As Currency, odds2 As Currency) As Single
Dim i As Double
Dim tickCount As Single
Dim thisStep As Double
Dim thisodds As Double
Select Case odds2
Case Is < 1.01, Is > 1000
GoTo Xit
End Select
Select Case odds1
Case Is < 1.01, Is > 1000
GoTo Xit
Case Is < odds2
tickCount = 0
i = odds1
Do While i <> odds2
thisStep = getOddsStepUp(i)
i = i + thisStep
tickCount = tickCount + 1
Loop
getTicks = tickCount
Case Is > odds2
tickCount = 0
i = odds1
Do While i <> odds2
thisStep = getOddsStepDown(i)
i = i - thisStep
tickCount = tickCount + 1
Loop
getTicks = tickCount - (tickCount * 2)
Case Is = odds2
getTicks = 0
End Select
Xit:
End Function
by xraymitch » Tue Oct 21, 2008 5:34 am
=getTicks(F5,H5)
by bw » Tue Oct 21, 2008 6:49 pm
by danjuma » Fri Dec 18, 2009 1:01 am
by dgs2001 » Fri Dec 18, 2009 8:22 am
by dgs2001 » Fri Dec 18, 2009 8:23 am
by danjuma » Fri Dec 18, 2009 3:33 pm
dgs2001 wrote:Hi Dan
I wrote it to work with a sheet linked to BA.
The loop is probably caused by the starting never equaling the other price.
I.E
If the expression was getTicks(A1,A2) and cell A1 contained the number 33,cell A2 contained the number 40, a loop would occur because the odds increment at these prices would be 2 but counting up from 33 in twos never gets to exactly 40.
Hope that makes sense.
Ds
by josthkko » Thu Feb 25, 2010 5:50 pm
by josthkko » Thu Feb 25, 2010 6:40 pm
by mak » Fri May 25, 2012 4:13 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.