Code to stop after one bet

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
leerudd
Posts: 28
Joined: Tue Dec 01, 2020 1:29 am

Hi All,
As I have added before i have a spreadsheet that i have designed for laying. I asked previously about code to close betting once in play, IE No bets placed after in play.
Works sort of but i want to restrict things further and only let the spreadhseet fire one bet into the market.
Anybody know what the commands are please ?

Currently using "=IF(E70="1",IF(G1<>"Inplay","LAY",""),"")"

These cells are 1 for each horse and if it meets the right criteria it fires, But as I said I want it only for fire once across the whole market, all cells.

Thanks In advance, Lee
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

leerudd wrote:
Thu May 06, 2021 11:46 pm
Hi All,
As I have added before i have a spreadsheet that i have designed for laying. I asked previously about code to close betting once in play, IE No bets placed after in play.
Works sort of but i want to restrict things further and only let the spreadhseet fire one bet into the market.
Anybody know what the commands are please ?

Currently using "=IF(E70="1",IF(G1<>"Inplay","LAY",""),"")"

These cells are 1 for each horse and if it meets the right criteria it fires, But as I said I want it only for fire once across the whole market, all cells.

Thanks In advance, Lee
Is there a column that shows the #bets for each horse? If that was say column AA then you could use something like...

=IF(AND(E70=1, G1<>"Inplay", SUM(AA:AA) = 0), "LAY","")

Use AND() to make sure all the conditions are in place, have as many condition as you like seperated by commas.

(btw if you use $G$1 instead of G1 then that reference won't change if you copy that cell elsewhere. Or if you had $G1, then the "G" won't change but the line number will if you copy the formula to another cell, and G$1 allows the column to change but not the line number. The "$" fixes that part of the cell ref. Handy when you fill a range of cells with a formula and usually have to edit each one because they're now pointing to the wrong cell, it's safer too in case you forget to edit one.)
leerudd
Posts: 28
Joined: Tue Dec 01, 2020 1:29 am

Thanks for the reply.
I dont really understand ?

I know that in Betangel you can stop automation if 1 bet is already in the market. Im trying to do the same with excel. When a bet is fired into the market i do get a confirmation within excel is that waht u mean ?

So for example
If the criteria was met and a bet was fired into the market from the following
=IF(E70="1",IF(G1<>"Inplay","LAY",""),"")
Then in cell o9 there would be "Placed" in that cell

Hope thats clear
leerudd
Posts: 28
Joined: Tue Dec 01, 2020 1:29 am

Also I wouldnt need the Inplay element as only 1 bet could be placed ?

Im getting confused
Anbell
Posts: 2004
Joined: Fri Apr 05, 2019 2:31 am

leerudd wrote:
Thu May 06, 2021 11:46 pm
Hi All,
As I have added before i have a spreadsheet that i have designed for laying. I asked previously about code to close betting once in play, IE No bets placed after in play.
Works sort of but i want to restrict things further and only let the spreadhseet fire one bet into the market.
Anybody know what the commands are please ?

Currently using "=IF(E70="1",IF(G1<>"Inplay","LAY",""),"")"

These cells are 1 for each horse and if it meets the right criteria it fires, But as I said I want it only for fire once across the whole market, all cells.

Thanks In advance, Lee
You could sum all of col Y and all of AE, and then sum those, and if the result is not zero then dont bet.

You'd want to keep the inplay bit, just in case
leerudd
Posts: 28
Joined: Tue Dec 01, 2020 1:29 am

Thanks Anbel, good idea.

I have tried this but it doesnt put a bet in the market. Can you or anyone else see where its wrong ?

I have auto summed all stakes so if a bet is already on it shouldnt fire another into the market.

=IF(E70="1",IF(Q27="0","LAY",""),"")

Q27 being the cell that autosums all stakes

As I read it with limited knowledge, If e70=1 and q27=0 then lay otherwise do nothing ??

Thanks
rostov
Posts: 50
Joined: Mon Jul 02, 2012 3:45 pm

Try: =IF(COUNTIFS(O9:O68,"=PLACED")>0,"STOP","LAY")
leerudd
Posts: 28
Joined: Tue Dec 01, 2020 1:29 am

rostov wrote:
Wed May 12, 2021 4:25 pm
Try: =IF(COUNTIFS(O9:O68,"=PLACED")>0,"STOP","LAY")
Hi Thanks for the reply. Can I ask you to explain what that does so i can learn please,

Regards
rostov
Posts: 50
Joined: Mon Jul 02, 2012 3:45 pm

It will place one LAY only.

If 'PLACED' is present in cells O9:O68, the count will be greater than zero and no further bets
will be placed, ie it will do nothing.

Use this if you prefer: =IF(COUNTIFS($O$9:$O$68,"=PLACED")>0," ","LAY")
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”