Spreadsheet Green_All function issue

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
acecard
Posts: 85
Joined: Wed Nov 01, 2017 9:39 pm

Hi all,

Hoping someone can help me with a query relating to the "Green_All" function in the spreadsheet.

I have spent months creating a spreadsheet to automate my LTD trades and thought I had it cracked! Apparently not!

In order to overcome the issue of a failed green up attempt due to perhaps the market moving fast at that point, I have some VBA that will trigger "Green_All", wait 5 seconds and then do it again, 6 times in total in an aim to ensure that out of 6 attempts, the exit will be matched.

I was under the impression that once out of the market, subsequent attempts to "Green_All" wouldn't do anything as I would be out of the market, however this seems to not be case at all! Each time my VBA triggered "Green_All", it put new bets into the market, massively increasing my liability each time! It seems that "Green_All" was backing the draw in order to get me out of the LTD trade, however the most annoying thing is that I couldn't work out what the heck was going on for a while as these bets were not being shown as matched bets in BetAngel, yet on my Betfair phone app, I could see the liability increasing!

Anyone have any ideas as to why the bets weren't being shown as matched back bets in BetAngel? I have clearly misunderstood the function of "Green_All"; is there a way to achieve what I am looking for (i.e. trigger the "Green_All" function multiple times to ensure an exit if the market is moving fast) without entering multiple unwanted back bets?!

What puzzled me is how can it green up a trade that isn't there? How would it know what stakes to use?!

Any help much appreciated!
AC
User avatar
BetScalper
Posts: 1139
Joined: Sun Jul 02, 2017 10:47 pm

acecard wrote:
Tue Jan 08, 2019 10:21 pm
Hi all,

Hoping someone can help me with a query relating to the "Green_All" function in the spreadsheet.

I have spent months creating a spreadsheet to automate my LTD trades and thought I had it cracked! Apparently not!

In order to overcome the issue of a failed green up attempt due to perhaps the market moving fast at that point, I have some VBA that will trigger "Green_All", wait 5 seconds and then do it again, 6 times in total in an aim to ensure that out of 6 attempts, the exit will be matched.

I was under the impression that once out of the market, subsequent attempts to "Green_All" wouldn't do anything as I would be out of the market, however this seems to not be case at all! Each time my VBA triggered "Green_All", it put new bets into the market, massively increasing my liability each time! It seems that "Green_All" was backing the draw in order to get me out of the LTD trade, however the most annoying thing is that I couldn't work out what the heck was going on for a while as these bets were not being shown as matched bets in BetAngel, yet on my Betfair phone app, I could see the liability increasing!

Anyone have any ideas as to why the bets weren't being shown as matched back bets in BetAngel? I have clearly misunderstood the function of "Green_All"; is there a way to achieve what I am looking for (i.e. trigger the "Green_All" function multiple times to ensure an exit if the market is moving fast) without entering multiple unwanted back bets?!

What puzzled me is how can it green up a trade that isn't there? How would it know what stakes to use?!

Any help much appreciated!
AC
There are many reasons why it could fail:

1. The BF API doesn’t support transactional processing. So you can’t roll back trades and reissue them if something hasn’t worked.

2. Just because you send a cancel all, green up or place a new trade doesn’t mean it has reached the market and been actioned. The api could fail or your actions could be queued up.

When you add the fact that your trading in-play then this can compound the above because markets are moving faster than not in-play etc.

Just because you issue a command and wait x seconds doesn’t mean it has worked properly and you can therefore just repeat the action.

The only way to do it is to breakdown your trading method and try to account for everything that could go wrong. But it’s not easy.

Example:

1. Place a new back trade.
2. Wait x seconds
3. Place a green up trade
4. Wait x seconds
5. Repeat the above

How do you know 1, 3 and 5 worked ?. You can’t just assume that 2 and 4 was long enough time to wait etc.

In slow moving markets or ones not in-play yet then you can get away with it to some degree but in fast moving markets or ones in-play then you can end up in a right mess.
acecard
Posts: 85
Joined: Wed Nov 01, 2017 9:39 pm

Yes, I understand that it's not a guarantee that the command will be processed, but my thinking was that multiple triggering of the green function would certainly be ok 95% of the time. The timings are also changeable, so I could do 10 sec wait between, with 10 triggers.

However, this isn't the issue I have had. The green all function worked fine in taking me out of the market. In fact, on that occasion, it took me out on the first go. What it then proceeded to do for each subsequent trigger of the command was to put me back into the market by backing the draw. So i ended up backing the draw 5 times! What I'm confused about is why it did that, how it managed to calculate the stakes to do those extra back bets seeing as i now had no lay bet in the market to be greened, and why those back bets didnt show up in my matched bets.

I thought that the green all command in the spreadsheets worked the same as clicking the green all on the ladders, I.e. once you have greened up across all outcomes, no amount of furthering clicking on the green does anything! Hence why I programmed it to trigger 6 times as in my logic, once out of the market, any further triggers wouldn't do anything!
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

It's a known concern that multiple greens can unbalance a position. If you have doubts about the BA GreenAll command, perhaps you could code your own closing transactions and thereby have more control over the staking?

It seem to be the case that if the closing trade stake is calulated as being more than a penny then BA continues to try and equalise it. I've long since suggested that the GreenAll command needs a tollerance parameter so you can specify a disparity you're satisfied with, perhaps no more than £1 diff across the field, rather than a default disparity that results in a stake greater than a penny.
acecard
Posts: 85
Joined: Wed Nov 01, 2017 9:39 pm

ShaunWhite wrote:
Wed Jan 09, 2019 2:03 pm
It's a known concern that multiple greens can unbalance a position. If you have doubts about the BA GreenAll command, perhaps you could code your own closing transactions and thereby have more control over the staking?

It seem to be the case that if the closing trade stake is calulated as being more than a penny then BA continues to try and equalise it. I've long since suggested that the GreenAll command needs a tollerance parameter so you can specify a disparity you're satisfied with, perhaps no more than £1 diff across the field, rather than a default disparity that results in a stake greater than a penny.
Hmmm, interesting. Ok thanks.

For the moment then, using your comments as inspiration, the only way I can see around this (or rather the simplest way) would be to have my green up code execute ONLY if the disparity across the field is over "x" amount; I could do this with some basic formulas using the PnL displayed in the connected spreadsheet. To do this, I would need to code in the maximum disparity across the field so that I can give my code a tolerance (as in some cases, you will not achieve the EXACT amount across all outcomes) - what sort of % of stake could I expect the largest disparity to be? 10% perhaps?
Another important thing would be what happens to any unmatched green up bets? Do unmatched bet have to be cancelled before attempting to green up again, or are they automatically cancelled?
User avatar
BetScalper
Posts: 1139
Joined: Sun Jul 02, 2017 10:47 pm

acecard wrote:
Wed Jan 09, 2019 9:11 pm
ShaunWhite wrote:
Wed Jan 09, 2019 2:03 pm
It's a known concern that multiple greens can unbalance a position. If you have doubts about the BA GreenAll command, perhaps you could code your own closing transactions and thereby have more control over the staking?

It seem to be the case that if the closing trade stake is calulated as being more than a penny then BA continues to try and equalise it. I've long since suggested that the GreenAll command needs a tollerance parameter so you can specify a disparity you're satisfied with, perhaps no more than £1 diff across the field, rather than a default disparity that results in a stake greater than a penny.
Hmmm, interesting. Ok thanks.

For the moment then, using your comments as inspiration, the only way I can see around this (or rather the simplest way) would be to have my green up code execute ONLY if the disparity across the field is over "x" amount; I could do this with some basic formulas using the PnL displayed in the connected spreadsheet. To do this, I would need to code in the maximum disparity across the field so that I can give my code a tolerance (as in some cases, you will not achieve the EXACT amount across all outcomes) - what sort of % of stake could I expect the largest disparity to be? 10% perhaps?
Another important thing would be what happens to any unmatched green up bets? Do unmatched bet have to be cancelled before attempting to green up again, or are they automatically cancelled?
Don’t assume anything. Cancel unmatched bets yourself (code) before issuing another Green Up. And in your Green Up code check first that there are no unmatched bets before continuing etc.
acecard
Posts: 85
Joined: Wed Nov 01, 2017 9:39 pm

Good points......Will do. Thanks!
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”