Excel offset percentage calculation

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

Excel offset percentage calculation

Postby doris_day » Mon Jul 08, 2013 3:02 pm

I'm trying another couple of algorithms I've been researching but find the offset calculation in Excel frustrating and wondered if anyone had a workround.

At the moment the calculation is a straightforward percentage including the stake. So if we have a price of 5.0 and want the offset to be at 50% the bet is placed at 2.50. My way of calculating the proper price is ((5.0-1)*50%)+1
which comes to 3.0.

I need a workround to get the offset set at my calculation. Any ideas ?
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am

Postby osknows » Mon Jul 08, 2013 7:47 pm

Hi doris,

I hope you're well.

I'm not quite sure what you're asking as OFFSET is a function in Excel which does something very different.

If you mean add a tick offset modifier then -Pn applies a % tick offset from the original bet. There's not much explanation in the help file but I'd assume it should be the same calc as you've outlined?

The alternative is -Tn, you could calculate the % requirement manually and then use the tickdiff function n = TickDiff(3,5) to give the number of ticks (see here http://www.gruss-software.co.uk/forum/v ... 6&start=15)

If I've misunderstood.. apologies :)
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby doris_day » Mon Jul 08, 2013 8:30 pm

Hi Os, yes fine here and almost finished the house. At long last. Did I settle up with you btw ? I have this awful feeling I owe you some money but I may be wrong. I've been so busy finishing the house.

The problem with Tn is, I wont know what the price is and how many ticks I'll need. That's why I need Pn. Im not certain why the boys decided to use a percentage that included the stake. It may be useful for others but its a pain for me.
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am

Postby osknows » Mon Jul 08, 2013 9:35 pm

All is good, you don't owe me anything.

If you know the back price, say X, you want the offset to be 50% which gives Y

In excel you can use the function =TickDiff(X,Y) to give the tick difference for any values you want. That way Tn isn't a fixed value but are between any odds you wish

Eg, using the example for odds of 5.0

Assuming cells
[AA1] = 5.0
[AA2] = (AA1-1)*0.5+1

Feed that into a trigger such as ="BACK-T" & TickDiff(AA1,AA2)
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby doris_day » Tue Jul 09, 2013 9:24 am

Yes, I understand the logic now.

Should work but for some reason I get VALUE! when using the function TickDiff. MinusTicks and PlusTicks works OK so I dont see why TickDiff shouldn't. No doubt there's a simple explanation
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am

Postby doris_day » Tue Jul 09, 2013 10:01 am

Now using the function with Gruss refreshing the sheet and sometimes I get the error VALUE! and sometimes a number which is odd
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am

Postby doris_day » Tue Jul 09, 2013 10:09 am

I think it must be due to the new value I have calculated not being a valid tick value. How can I round to the nearest valid tick value ?
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am

Postby doris_day » Tue Jul 09, 2013 10:39 am

No, I don't think that's the problem
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am

Postby doris_day » Tue Jul 09, 2013 10:42 am

It says in the error box 'A value in the formula is of the wrong data type'
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am

Postby osknows » Tue Jul 09, 2013 10:47 am

Yes you need to round values to the nearest tick before passing into the function TickDiff

This is what I use

Code: Select all
Public Function ticksRound(odds As Currency) As Currency
Dim roundedMutliple As Currency
Dim valueDiv As Currency
Dim valueNew As Currency
Dim IncrementOdds As Currency

    Select Case odds
        Case Is < 1
            ticksRound = 1.01
            Exit Function
        Case Is < 2
            IncrementOdds = 0.01
        Case Is < 3
            IncrementOdds = 0.02
        Case Is < 4
            IncrementOdds = 0.05
        Case Is < 6
            IncrementOdds = 0.1
        Case Is < 10
            IncrementOdds = 0.2
        Case Is < 20
            IncrementOdds = 0.5
        Case Is < 30
            IncrementOdds = 1
        Case Is < 50
            IncrementOdds = 2
        Case Is < 100
            IncrementOdds = 5
        Case Is < 1000
            IncrementOdds = 10
        Case Else
            ticksRound = 1000
            Exit Function
    End Select
     

    valueDiv = odds / IncrementOdds
    roundedMutliple = Int(valueDiv + 0.5)
    valueNew = roundedMutliple * IncrementOdds
    ticksRound = valueNew
     
End Function
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby doris_day » Tue Jul 09, 2013 11:01 am

Thanks. That's done it.
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am


Return to Discussion

Who is online

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