BACKR and LAYR

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

Moderator: 2020vision

BACKR and LAYR

Postby chopper » Mon Jan 25, 2010 9:54 am

Hello,

When I use excel to place bets I expect the odds and stakes that I wish to trade at to be constantly changing. I therefore expect to only be using the BACKR and LAYR triggers.

Because of this I need to remove the 'N' from the end of the bet reference. Is there an option to do this for BACKR and LAYR? If not I can do this just using an if statement unless anyone has any other better suggestions?

The Bet reference goes in column T. Does BA work by always going to this particular column? If so what do I do, should I insert another column so I can make a new reference without the 'N' but how do I make BA use the new reference?

What happens if I'm partially filled? That will put a 'P' at the end of my reference. Will I have to modify this or will I have to do the same thing as I do with the 'N'?

Thanks.
User avatar
chopper
 
Posts: 15
Joined: Wed Dec 30, 2009 2:33 pm

Postby GaryRussell » Mon Jan 25, 2010 10:11 am

N will always be appended I'm afraid. It's to prevent BACKR/LAYR from continuously being triggered.

It will always use the ref from column T.

If it is partially matched you will also need to remove the P before the trigger will work.

N or P cannot be removed using a formula, but you could use a formula to populate another cell with a value then you could write a very small amount of VBA which checks this cell and removes the N or P if a specific value appears in this cell.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby chopper » Mon Jan 25, 2010 10:46 am

Thanks for the quick response Gary.

Are these BACKR and LAYR functions effectively cancelling my current order and then sending a new order? Does this mean it takes longer than just updating the unmatched trade? I suppose it means I make more requests as well?

I was thinking of just using an IF statement to take the text string before the N or the P and putting this in column T and get the original reference to come in somewhere else but yeah I thought it might not be possible.

I've never used VBA before and was hoping to get this up and running for the Nadal vs Murray match tonight! Is there any chance you could give me an idea of what the code should like?

Cheers.
User avatar
chopper
 
Posts: 15
Joined: Wed Dec 30, 2009 2:33 pm

Postby Castillo » Mon Jan 25, 2010 10:57 am

chopper wrote:Is there any chance you could give me an idea of what the code should like?


Try looking at pages 4 & 5 on this thread, hope this helps.

http://www.gruss-software.co.uk/forum/v ... php?t=2840

Cheers
Castillo
Castillo
 
Posts: 346
Joined: Thu Mar 16, 2006 11:01 am

Postby chopper » Mon Jan 25, 2010 11:25 am

Thanks for that Castillo.

I see that you started off the same way as me with an IF statement. Then another poster suggested using this code:

If Right(Range("T6").Value, 1) = "N" Then
Range("T6").Replace What:="N", Replacement:=""
Else
End If

So should that do the trick? Is that what you use?
User avatar
chopper
 
Posts: 15
Joined: Wed Dec 30, 2009 2:33 pm

Postby GaryRussell » Mon Jan 25, 2010 12:13 pm

1) Insert following formula in cell Y3
Code: Select all
=COUNTIF(Y5:Y50,"=1")


2) Press alt-f11 to open the code editor, double click your worksheet name on the left and insert the following code.
Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim r As Integer, ref As String
    If Cells(3, 25) <> 0 Then
        Application.EnableEvents = False
        For r = 5 To 50
            If Cells(r, 25) = 1 Then
                ref = Cells(r, 20)
                If Right(ref, 1) = "N" Or Right(ref, 1) = "P" Then Cells(r, 20) = Left(ref, Len(ref) - 1)
            End If
        Next
        Application.EnableEvents = True
    End If
End Sub


You can now put formulas in cells Y5 to Y50 that put 1 in column Y next to the bet you want the N removed from.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby GaryRussell » Mon Jan 25, 2010 12:16 pm

Take care that column Y does not always contain 1 otherwise it will constantly be removing the N and therefore allowing the BACKR/LAYR triggers to fire, replacing the same bet over and over again. This could potentially be costly as you will incur transaction charges. If you make more than 1000 bets in an hour you are charged 1 pence per excess request.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK


Return to Discussion

Who is online

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