'Close all positions'

Please post any questions regarding the program here.

Moderator: 2020vision

Re: 'Close all positions'

Postby brumbie » Sun Jun 16, 2019 2:51 pm

If you are using Row 5 in excel as an example which I assume you are then no, the T5 I am using is the cell (I am assuming that the bet ref goes in cell T5 in a greyhound spreadsheet as it does in a horse racing spreadsheet.)
It is unfortunate that the cell T5 is also a ref in "BACK-T5" but they have no connection in what we are talking about....gee you've sobered me up on fathers day..lol.
brumbie
 
Posts: 197
Joined: Tue Dec 28, 2010 2:00 am
Location: Brisbane,Australia

Re: 'Close all positions'

Postby posimmo » Sun Jun 16, 2019 2:56 pm

brumbie wrote:gee you've sobered me up on fathers day..lol.


Not wasted then.

But, thanks to your help (and also MollyMoo) I've actually managed to work it out I think. The timer I have in cell Q1 and the following formula in the trigger cell seems to do the trick - hooray!

=IF(AD5=3,"BACK-T5",IF($Q$1<4,"CLOSE"))

Best regards

Polly
posimmo
 
Posts: 27
Joined: Sun Feb 08, 2015 1:41 pm

Re: 'Close all positions'

Postby MollyMoo » Sun Jun 16, 2019 3:10 pm

Yes, CLOSEC cancels any unmatched bets on the selection before greening up, CLOSE doesn't cancel any unmatched bets and just greens up.

You could use the following formula in your Trigger cells:

Code: Select all
=IF($A5 <> "",IF(AND($AD$5<=3, $Q5 = "BACK-T5"),"CLOSEC",IF(AND($Q5 = "", $AD$5 <= 5), "BACK-T5", "")), "")


Place this in cell Q5 then drag and copy the formula down column Q to copy to all trigger cells.

What this does is to check there is a runner in column A on the same row as the formula. If so, it checks if the timer in cell AD5 has reached 3 seconds, that the BACK trigger has already been sent and that the CLOSEC trigger hasn't already been sent. If that's the case, then it sends the CLOSEC command. Otherwise it checks if the timer has reached 5 seconds and the BACK trigger hasn't yet been sent. If so, it issues the BACK-T5 command.

Obviously, you can change the values of cell AD5 to check to suit your own needs. Just test that formula with small stakes initially to make sure I've written it correctly!!
MollyMoo
 
Posts: 104
Joined: Mon Sep 11, 2017 9:31 am
Location: UK

Re: 'Close all positions'

Postby brumbie » Sun Jun 16, 2019 3:15 pm

=IF(AD5=3,"BACK-T5",IF($Q$1<4,"CLOSE"))

How that works is beyond me , I guess i misunderstood what you wanted..all good . Also, we don't normally help out basic excel on here, rather further problems..good luck.
brumbie
 
Posts: 197
Joined: Tue Dec 28, 2010 2:00 am
Location: Brisbane,Australia

Re: 'Close all positions'

Postby MollyMoo » Sun Jun 16, 2019 3:20 pm

MollyMoo wrote:Yes, CLOSEC cancels any unmatched bets on the selection before greening up, CLOSE doesn't cancel any unmatched bets and just greens up.

You could use the following formula in your Trigger cells:

Code: Select all
=IF($A5 <> "",IF(AND($AD$5<=3, $Q5 = "BACK-T5"),"CLOSEC",IF(AND($Q5 = "", $AD$5 <= 5), "BACK-T5", "")), "")


Place this in cell Q5 then drag and copy the formula down column Q to copy to all trigger cells.

What this does is to check there is a runner in column A on the same row as the formula. If so, it checks if the timer in cell AD5 has reached 3 seconds, that the BACK trigger has already been sent and that the CLOSEC trigger hasn't already been sent. If that's the case, then it sends the CLOSEC command. Otherwise it checks if the timer has reached 5 seconds and the BACK trigger hasn't yet been sent. If so, it issues the BACK-T5 command.

Obviously, you can change the values of cell AD5 to check to suit your own needs. Just test that formula with small stakes initially to make sure I've written it correctly!!


I think I misunderstood where you were holding your timer countdown value. It's not in AD5, is it, but Q1?

So the formula would be:

Code: Select all
=IF($A5 <> "",IF(AND($Q$1 < 4, $Q5 = "BACK-T5"),"CLOSEC", IF(AND($Q5 = "", $AD$5  = 3), "BACK-T5", "")), "")
MollyMoo
 
Posts: 104
Joined: Mon Sep 11, 2017 9:31 am
Location: UK

Re: 'Close all positions'

Postby brumbie » Sun Jun 16, 2019 3:29 pm

Wow, you just have to ask the cell T5 if its populated...why the fuss?
brumbie
 
Posts: 197
Joined: Tue Dec 28, 2010 2:00 am
Location: Brisbane,Australia

Re: 'Close all positions'

Postby posimmo » Sun Jun 16, 2019 3:43 pm

Thank you both very much, MollyMoo and brumbie.

Best regards

Polly
posimmo
 
Posts: 27
Joined: Sun Feb 08, 2015 1:41 pm

Re: 'Close all positions'

Postby MollyMoo » Sun Jun 16, 2019 7:19 pm

brumbie wrote:Wow, you just have to ask the cell T5 if its populated...why the fuss?


Well, brumbie, I always check whether the cell in column A is empty or not in case of a non-runner (I'm used more to horse racing than greyhounds, but I thought there might be an instance in greyhound racing where a trap might be empty).

I also check whether the BACK or CLOSEC triggers have already been issued so that multiple commands aren't sent to Betfair.

If Polly has managed to achieve what she wanted by another formula, then great. Job done.
MollyMoo
 
Posts: 104
Joined: Mon Sep 11, 2017 9:31 am
Location: UK

Re: 'Close all positions'

Postby brumbie » Sun Jun 16, 2019 9:57 pm

"=IF($A5 <> "",IF(AND($Q$1 < 4, $Q5 = "BACK-T5"),"CLOSEC", IF(AND($Q5 = "", $AD$5 = 3), "BACK-T5", "")), "")"

I haven't looked at a greyhound spreadsheet but assume it is the same as a horseracing one which would mean the trigger is actually in Q5. This would mean you are talking to Q5 about itself which would straight away mean you need iterative calculations ticked or it wouldn't understand?
Double checking it I doubt if it would work even then Molly.
brumbie
 
Posts: 197
Joined: Tue Dec 28, 2010 2:00 am
Location: Brisbane,Australia

Previous

Return to Help

Who is online

Users browsing this forum: No registered users 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.