Bet Angel - Example spreadsheets : How many ticks on a ladder?

Example spreadsheets and comments on example spreadsheets.
Post Reply
Dadders
Posts: 35
Joined: Mon Oct 03, 2016 1:36 pm

Mon Jun 25, 2018 11:28 am

I should probably post this in the newbie section.

I watched a video yesterday and the person said there were 351 ticks on a ladder but I'm only getting 350, I've counted through my spreadsheet manually a few times but cannot spot a mistake. So is there 351 or 350?

I'm trying to make a very simple spreadsheet that I can enter two different odds i.e. (a) 4.2 and (b) 5.8 and calculate how many ticks there are from (a) to (b), in this case there are 16 ticks.
Is there a simple spreadsheet floating around on here I could use for this?

Thanks in advance.

User avatar
Dallas
Posts: 8162
Joined: Sun Aug 09, 2015 10:57 pm

Mon Jun 25, 2018 11:31 am

There are 350 decimal odds

Dadders
Posts: 35
Joined: Mon Oct 03, 2016 1:36 pm

Mon Jun 25, 2018 11:36 am

"Thanks Dallas" :)

spreadbetting
Posts: 1549
Joined: Sun Jan 31, 2010 8:06 pm

Mon Jun 25, 2018 12:02 pm

Here's some VBA functions to play around with ticks, get valid odds, difference between prices , add to or take away ticks from a price etc

You just simply add them to a VBA module and call them by sticking the function in a cell

=getTicks(A1,A2)

=minusTicks(A1,1)

Code: Select all

Function getValidOdds(ByVal odds As Currency) As Currency
Dim oddsInc As Currency
Select Case odds
Case 1 To 2
oddsInc = 0.01
Case 2 To 3
oddsInc = 0.02
Case 3 To 4
oddsInc = 0.05
Case 4 To 6
oddsInc = 0.1
Case 6 To 10
oddsInc = 0.2
Case 10 To 20
oddsInc = 0.5
Case 20 To 30
oddsInc = 1
Case 30 To 50
oddsInc = 2
Case 50 To 100
oddsInc = 5
Case 100 To 1000
oddsInc = 10
End Select
If Math.Round(odds + oddsInc, 2) <= 1000 Then
getValidOdds = Round(odds / oddsInc, 0) * oddsInc
Else
getValidOdds = 1000
End If

If getValidOdds = 1 Then getValidOdds = 1.01

End Function



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




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

Post Reply

Return to “Bet Angel - Example spreadsheets”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest