Green Up (xl sample)

Please post any questions regarding the program here.

Moderator: 2020vision

Postby mak » Mon Apr 12, 2010 3:38 pm

Thanks Gary, your the best :D
mak
 
Posts: 1086
Joined: Tue Jun 30, 2009 8:17 am

Postby mak » Tue Apr 13, 2010 1:47 pm

Gary hi
I am testing right now the new sample sheet (GreenUp_OpposingOdds) which is excactly what i wanted, but i have a question regarding W coloumn
(Matched stake)

If i place a Back Bet of 2€ and they are matched, the W column shows 2 which is fine.If I place another Back Bet of 2€ and they are matched it still shows 2. Just because i haven't noticed that coloumn untill now is it that how it suppose to work or i am missing someting?
mak
 
Posts: 1086
Joined: Tue Jun 30, 2009 8:17 am

Postby GaryRussell » Tue Apr 13, 2010 3:47 pm

The matched stake column only shows the matched stake for the bet ref currently displayed in column T. It is not a total for the selection. I could modify the example to output an extra column to display the total matched stake for the selection if you need.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby mak » Tue Apr 13, 2010 4:15 pm

Gary,
please do when you find some time.
I would also like to ask you, if i remember correct, is it on you "to do list" to provide in BA 2 extra columns with the minimum & maximum price for a selection?If yes when do you believe that you could provide it?

Thanks again, I am very happy today with this sample... :D
mak
 
Posts: 1086
Joined: Tue Jun 30, 2009 8:17 am

Postby Lewis » Wed Apr 14, 2010 12:50 pm

Hi, just a little help trying to clean my code up.

The routine is currently running everytime the data changes in excel which for my sheet can be more than once a second. Is there an easy way to change this to less frequently or at a set time. I trade pre-race markets and only use the algorithm in the last 30 seconds or so.

I could either set a time so it refreshes once every few seconds or I could call it from another part of the program.

My question is what would be the easiest way to change this without having to hack the code up too much. Just a suggestion will be enough and I will go and find the implementation method myself.

[Also - thanks for this example Gary, has proven an excellent help to me.]
Lewis
 
Posts: 50
Joined: Sun Mar 28, 2010 10:15 pm

Postby GaryRussell » Wed Apr 14, 2010 3:44 pm

You could put an if statement around the code in the worksheet_change event for the MyBets worksheet which only runs the code if it's within 30 seconds of the off time.

eg.
Code: Select all
Dim t As Date, secondsFromStart As Integer
t = Worksheets("sheet1").Range("d2")
secondsFromStart = (Hour(t) * 3600) + (Minute(t) * 60) + Second(t)
If secondsFromStart <= 30 then .....
[/code]
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby mak » Wed Apr 14, 2010 4:07 pm

mak wrote:Gary,
please do when you find some time.
I would also like to ask you, if i remember correct, is it on you "to do list" to provide in BA 2 extra columns with the minimum & maximum price for a selection?If yes when do you believe that you could provide it?

Thanks again, I am very happy today with this sample... :D


Gary have seen this?
mak
 
Posts: 1086
Joined: Tue Jun 30, 2009 8:17 am

Postby GaryRussell » Wed Apr 14, 2010 4:11 pm

mak wrote:
mak wrote:Gary,
please do when you find some time.
I would also like to ask you, if i remember correct, is it on you "to do list" to provide in BA 2 extra columns with the minimum & maximum price for a selection?If yes when do you believe that you could provide it?

Thanks again, I am very happy today with this sample... :D


Gary have seen this?


It's on my list, but not high priority. It could be programmed in VBA in theory. Unfortunately I cannot promise a timescale for this at present.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby mak » Wed Apr 14, 2010 4:13 pm

thats ok thanks
mak
 
Posts: 1086
Joined: Tue Jun 30, 2009 8:17 am

Postby GaryRussell » Thu Apr 15, 2010 7:08 am

mak wrote:Gary,
please do when you find some time.
I would also like to ask you, if i remember correct, is it on you "to do list" to provide in BA 2 extra columns with the minimum & maximum price for a selection?If yes when do you believe that you could provide it?

Thanks again, I am very happy today with this sample... :D


I have updated the opposing odds example. There are two extra columns: total matched back stakes and total matched lay stakes.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby mak » Thu Apr 15, 2010 6:13 pm

Gary thanks!

Can you explain how through vba i can get the minimum & maximum price matched for the selections?I am sure i can't write it, but with this one i don't have a clue, even to think the structure...
mak
 
Posts: 1086
Joined: Tue Jun 30, 2009 8:17 am

Postby 2020vision » Fri Apr 16, 2010 12:08 am

mak wrote:Gary thanks!

Can you explain how through vba i can get the minimum & maximum price matched for the selections?I am sure i can't write it, but with this one i don't have a clue, even to think the structure...


Hi mak :)

Maybe I am missing a trick - how can anyone or any bot get you the
minimum or maximum price matched for selections? To me the minimum is
1.01 and the maximum is 1000? You can not know how low or how high a
price will go in advance? Perhaps I have the wrong end of the stick?

Sorry if I made a mistake but I am pretty raw when it comes to VBA, Excel
and bots, etc. Am actually trying to learn so please be patient, Thanks.

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

Postby Captain Sensible » Fri Apr 16, 2010 12:19 am

I think they're talking about the min and max matched prices, 2020.

Are you looking for the overall min and max prices mak or just from when you enter the market? I have something someone on here wrote in vba to log them for when you enter the market .

Private Sub Worksheet_Change(ByVal Target As Range)
Dim iRow As Integer
Dim iCol As Integer
Dim cell As Object

For Each cell In Target
iRow = cell.Row
iCol = cell.Column


' Update Max and Min Back Values
If iCol = 15 And iRow > 4 And iRow < 46 Then

Application.EnableEvents = False
If IsEmpty(Range("AJ" & iRow).Value) Then Range("AJ" & iRow).Value = 0
If IsEmpty(Range("AI" & iRow).Value) Then Range("AI" & iRow).Value = 1001
If IsEmpty(Range("AH" & iRow).Value) Then Range("AH" & iRow).Value = Range("O" & iRow).Value

If Not IsEmpty(cell.Value) Then
Range("AG" & iRow).Value = Range("O" & iRow).Value
If cell.Value < Range("AI" & iRow).Value And cell.Value > 1 Then Range("AI" & iRow).Value = cell.Value
If cell.Value > Range("AJ" & iRow).Value And cell.Value < 1001 Then Range("AJ" & iRow).Value = cell.Value
End If

Application.EnableEvents = True
End If

That'll log the start price in AH lowest in AI and highest in AJ


Next cell

End Sub
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby Captain Sensible » Fri Apr 16, 2010 12:23 am

Private Sub Worksheet_Change(ByVal Target As Range)
Dim iRow As Integer
Dim iCol As Integer
Dim cell As Object

For Each cell In Target
iRow = cell.Row
iCol = cell.Column


' Update Max and Min Back Values
If iCol = 15 And iRow > 4 And iRow < 46 Then

Application.EnableEvents = False
If IsEmpty(Range("AJ" & iRow).Value) Then Range("AJ" & iRow).Value = 0
If IsEmpty(Range("AI" & iRow).Value) Then Range("AI" & iRow).Value = 1001
If IsEmpty(Range("AH" & iRow).Value) Then Range("AH" & iRow).Value = Range("O" & iRow).Value

If Not IsEmpty(cell.Value) Then
Range("AG" & iRow).Value = Range("O" & iRow).Value
If cell.Value < Range("AI" & iRow).Value And cell.Value > 1 Then Range("AI" & iRow).Value = cell.Value
If cell.Value > Range("AJ" & iRow).Value And cell.Value < 1001 Then Range("AJ" & iRow).Value = cell.Value
End If

Application.EnableEvents = True
End If



Next cell

End Sub
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby 2020vision » Fri Apr 16, 2010 12:28 am

Ok Capt :)

but then again if the min or max has shifted you can not get it matched?
And if at the present time it is min or max could it not go higher or lower still?

Not trying to be argumentative, just trying to understand.

Seems that you choose a personal min or max and either bet or not?

The only way for min or max to be matched is to place the bet after the fact
- impossible, unless 1.01 or 1000. Please have patience?

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

PreviousNext

Return to Help

Who is online

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