Excel - Set odds @ LTP + 1 tick

Please post any questions regarding the program here.

Moderator: 2020vision

Excel - Set odds @ LTP + 1 tick

Postby PeterSeth » Wed Aug 06, 2014 9:08 am

Hi, I want to set my odds to Last Traded Price plus 1 tick, I have tried "O5+T1" (cell O5 being Last Traded Price , row 5) but excel just treats "T1" as a cell reference, is there an easy way for this?
PeterSeth
 
Posts: 12
Joined: Sun Jul 10, 2011 8:57 pm
Location: New Zealand

Re: Excel - Set odds @ LTP + 1 tick

Postby mak » Wed Aug 06, 2014 9:43 am

you will have to add this in your excel file (alt f11)
these are functions created from Gary and other users
if you install them correct you have to use the formula =plusticks(o5,1) and it will work

Function getPrevOdds(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
If Math.Round(odds - oddsInc, 2) >= 1.01 Then
getPrevOdds = Math.Round(odds - oddsInc, 2)
Else
getPrevOdds = 1.01
End If
End Function

Function getNextOdds(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
If Math.Round(odds + oddsInc, 2) <= 1000 Then
getNextOdds = Math.Round(odds + oddsInc, 2)
Else
getNextOdds = 1000
End If
End Function

Function plusTicks(odds As Currency, ticks As Byte) As Currency
Dim i As Byte
For i = 1 To ticks
odds = getNextOdds(odds)
Next
plusTicks = odds
End Function

Function minusTicks(odds As Currency, ticks As Byte) As Currency
Dim i As Byte
For i = 1 To ticks
odds = getPrevOdds(odds)
Next
minusTicks = odds
End Function
mak
 
Posts: 1086
Joined: Tue Jun 30, 2009 8:17 am

Re: Excel - Set odds @ LTP + 1 tick

Postby PeterSeth » Thu Aug 07, 2014 10:27 am

Many thanks Mak,

I am a bit of a novice with macros, but basically a cut and paste and a bit of learning curve, and it's working perfectly! Cheers!
PeterSeth
 
Posts: 12
Joined: Sun Jul 10, 2011 8:57 pm
Location: New Zealand


Return to Help

Who is online

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