Auto clearing bet ref when kill or fill fails........

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

Moderator: 2020vision

Auto clearing bet ref when kill or fill fails........

Postby Al See » Fri Sep 04, 2009 4:33 pm

Is there an easy way to stop the bet reference cell displaying 'cancelled' when a kill or fill bet fails as I want BM to try placing the bet again providing conditions are met again.

As I understand it, once kill of fill fails once then the cell displays 'cancelled' and this precludes BM from trying to place the bet again. If the bet ref is a genuine matched one then I don't want it auto clearing, only if the bet fails.

Any ideas?
Al See
 
Posts: 6
Joined: Tue Jul 07, 2009 10:25 am

Postby GaryRussell » Sat Sep 05, 2009 8:48 am

You can't set Betting Assistant to do this, but you could use the Worksheet_Change event in Excel VBA to remove CANCELLED whenever it appears. Insert the following code into the worksheet module.

Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Columns.Count = 16 Then
        Application.EnableEvents = False
        With Range("t5:t54")
            Set c = .Find("CANCELLED", LookIn:=xlValues)
            If Not c Is Nothing Then
                firstaddress = c.Address
                Do
                    c.Value = ""
                    Set c = .FindNext(c)
                    If Not c Is Nothing Then
                        If c.Address = firstaddress Then c = Nothing
                    End If
                Loop While Not c Is Nothing
            End If
        End With
        Application.EnableEvents = True
    End If
End Sub
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby dogform » Thu Sep 17, 2009 12:59 pm

If I wish to clear the BetRef field of any types of value except PENDING could I use a modified version of the code posted above ?

For example, if I trigger a bet from excel with the properties of:

BACK-TL2-F5-SL5

ie, a back bet with an auto levelling 2 tick offset, the back side filled or killed in 5 seconds with a 5 tick stop loss. The options that I think will be in the BetRef field in excel are, PENDING, CANCELLED or an actual numerical bet reference? These are the values that I have observed in practice but I am not sure if any others could arise that I did not notice while testing.

If my bet is placed or cancelled then I wish to clear the BetRef field automatically to allow the process to repeat itself in a loop.

The above code will clear the CANCELLED value but i am not sure how to modify it to clear all values except PENDING due to a severe lack of VBA knowledge.

Thx for any help

Rgds
Dog
dogform
 
Posts: 63
Joined: Mon Oct 06, 2008 4:40 pm

Postby doris_day » Fri Mar 19, 2010 9:34 am

I've been trying to get CANCELLED cleared too but am not having a great deal of luck. I put the code above into the relevant module but its still not clearing.

Is there anything I can add to the trigger to do this or any other VBA code I can use ? Or even a suggestion as to why the above code isnt doing the job ?

I've tried IF(T5="CANCELLED","CLEAR","") but that doesnt seem to work for some strange reason.

Any suggestions would be helpful. Thx

PS Can anyone suggest a good site where I can learn VB ?
'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 kiint » Fri Mar 19, 2010 11:04 am

I can't test it out as I'm in work, but should Gary's code say:

If Target.Columns.Count <> 16 Then

instead of

If Target.Columns.Count = 16 Then
kiint
 
Posts: 148
Joined: Tue Feb 23, 2010 12:12 am

Postby robm232 » Fri Mar 19, 2010 1:29 pm

robm232
 
Posts: 21
Joined: Thu Mar 11, 2010 8:28 pm
Location: Dublin

Thanks for links

Postby 2020vision » Fri Mar 19, 2010 1:34 pm

Nice one robm232 :)

I am just beginning to try and use the Excel functionality of Gruss BA
and I will certainly have a look around these sites for educational reasons.

Ttfn - Michael :)
User avatar
2020vision
Moderator
 
Posts: 605
Joined: Sun Feb 17, 2008 10:24 pm
Location: Nottingham

Postby doris_day » Fri Mar 19, 2010 2:27 pm

Thanks rob. I'll take a look...
'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 » Fri Mar 19, 2010 3:40 pm

I've found a workaround which seems to work fine....
'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: No registered users and 36 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.