Moderator: 2020vision
by Conrad1971 » Fri Feb 17, 2012 2:35 pm
by osknows » Tue Feb 21, 2012 4:06 pm
Option Explicit
Dim currentMarket As String
Dim trigger1 As Boolean
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
With Target.Parent
If .Range("A1").Value <> currentMarket Then
currentMarket = .Range("A1").Value
trigger1 = False
'reapply formula
.Range("AA5").Formula = "=IF(E6>5,TRUE,FALSE)"
End If
'fire only if trigger not fired/False
If Not trigger1 And .Range("AA5").Value = True Then
trigger1 = True
'lock formula as value
.Range("AA5").Value = .Range("AA5").Value
End If
End With
Application.EnableEvents = True
End If
End Sub
by Conrad1971 » Tue Feb 21, 2012 9:40 pm
What i am trying to do i dont think is that complicated, all i want to do is back a horse when it reaches certain odds (lets say 10), then if the same horses odds go down (lets say to 8) then i want to lay it, then if the same horses odds go back up (lets say to 14) i want to back it again. My trigger for the above senario would be:-
=IF(AND(X6=0,F6=10),"BACK",IF(AND(X6>1,F6=8),"LAY",IF(AND(X6=10,F6=14),"BACK","CLEAR")))
What is happening is the second part of the bet (the lay bet @8) is trigering multiple times, i.e if the odds go up to 8 then down to 7, then up to 8, down to 7........., then i end up with up to 5 lay bets and a huge loss on that horse.
by Conrad1971 » Tue Feb 21, 2012 9:42 pm
by osknows » Wed Feb 22, 2012 11:46 am
=IF(AND(X5=0,F5=10,Y5=""),"BACK",IF(AND(X5>1,F5=8,Y5="BACK1"),"LAY",IF(AND(X5=10,F5=14,Y5="LAY1"),"BACK",IF(T5<>"","CLEAR",""))))
Option Explicit
Dim currentMarket As String
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Long
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
With Target.Parent
If .Range("A1").Value <> currentMarket Then
currentMarket = .Range("A1").Value
.Range("Y5:Y55").ClearContents
End If
For i = 5 To 55
If .Range("Q" & i).Value = "BACK" And .Range("Y" & i).Value = "" Then
.Range("Y" & i).Value = "BACK1"
ElseIf .Range("Q" & i).Value = "LAY" Then
.Range("Y" & i).Value = "LAY1"
ElseIf .Range("Q" & i).Value = "BACK" And .Range("Y" & i).Value = "LAY1" Then
.Range("Y" & i).Value = "BACK2"
ElseIf .Range("Y" & i).Value = "BACK2" Then
.Range("Y" & i).ClearContents
End If
Next i
End With
Application.EnableEvents = True
End If
End Sub
by 2020vision » Wed Feb 22, 2012 12:01 pm
Conrad1971 wrote:Sorry osknows, everywhere i typed the number eight, the number seems to have been replaced with a smily face and glasses!!!!
by Conrad1971 » Wed Feb 22, 2012 12:44 pm
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.