Excel: place multiple bets at different prices on same selection

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
Anbell
Posts: 2049
Joined: Fri Apr 05, 2019 2:31 am

I'm new to BA and am having some typical newbie issues.

I'm using excel, and using the IF function to BACK.

I want to simultaneously place multiple bets on the same horse when a trigger is met: e.g 1 bet at the market price, and another bet at market +5%. and another bet at market +10%.

I've searched without finding an answer, although I'm sure this is a common problem.

Would appreciate a link / some guidance.

Thanks.
CallumPerry
Posts: 575
Joined: Wed Apr 19, 2017 5:12 pm
Location: Wolverhampton

Is your IF function the sole trigger for all three bets? I.e. IF(A1="Yes","BACK","")?

If this is the case you could just look at one of the readily available spreadsheets that clears the contents of the PLACED cell when your first bet (at market price) bet reaches the market and run a quick bit of code that immediately does the following:

Clear PLACED
Trigger 2nd Bet at Market +5%
Clear PLACED
Trigger 3rd Bet at Market +10%

The bets would only be going in milliseconds apart which even on quick moving markets would be fine as the price 'shouldn't' move all the way up to +5/10% as quick as you can get your bet there so you 'should' comfortably be at the front of the queen waiting.
Anbell
Posts: 2049
Joined: Fri Apr 05, 2019 2:31 am

Thanks Callum - appreciate the feedback.

Yes - the IF function is the same for each bet.

I just need to write that tricky (for me) VBA code...
CallumPerry
Posts: 575
Joined: Wed Apr 19, 2017 5:12 pm
Location: Wolverhampton

PM me if you'd like.

By all means have a go first as it's a great skill to learn but if you get stuck I now consider myself slightly above the beginner level ;) It's such a wide field this coding stuff, especially if like me you are completely new to it before discovering BA.
Anbell
Posts: 2049
Joined: Fri Apr 05, 2019 2:31 am

Thanks so much for your generous offer!

I'll have a try over the next couple of days and PM you WHEN I need some help!
Anbell
Posts: 2049
Joined: Fri Apr 05, 2019 2:31 am

If anyone is interested, I finally found a reasonable working solution to this, 3 months later, using DoWhile & DoEvents & a quick refresh rate:


For j = 9 To 55 Step 2
If (conditions are met)
Range("L" & j).Formula = "=""BACK"""
Do While Range("O" & j).Value = ""
DoEvents
Loop
Range("O" & j).Value = ""
(Add subsequent bets)
End If
Next j

There are probably tidier more efficient ways, but this works for me atm.

The DoWhile waits for PLACING or PLACED, then clears that, so you can proceed to the next task, and the DOEvents means that Excel doesnt freeze.

The problem I was having was I couldnt find a way to tell excel to Do Nothing and Wait until it could clear the Status cell. This fixes that, clumsily, and now I dont have to keep calling other macros to check that everything is in place.
User avatar
gstar1975
Posts: 622
Joined: Thu Nov 24, 2011 11:59 am

After 5 years is there an update on how to do this?

I have started using Excel and would like to place opposing bets at a certain % above and below the Average prices. Excel only allows to place 1 bet so how do you clear the status cell only once and then place an opposing bet.

I have cells that calculate the odds and liability stakes at which i would like place the bets and depending on where the price is to these possible 4 price levels I would like to place the bets at (but only 1 above and 1 below).

So there are 4 scenarios:

If LTP at 2mtp is >=AVG+20% price then place a Back bet at Best Market Price using liability stake for the BMP on the Back side
If LTP at 2mtp is <AVG+20% price then place a Back bet at AVG+20% Price using liability stake for AVG+20% price
If LTP at 2mtp is <=AVG-20% price then place a Lay bet at BMP using liability stake for the BMP on the Lay side
If LTP at 2mtp is >AVG-20% price then place a Lay bet at AVG-20% Price using liability stake for AVG-20% price
Hedge at 0mtp

I have cells for these odds and stakes I just need to get BA/Excel to place the relevent bets at the relevent prices using the relevent stakes. Its easy to manually do this but I'd like to automate it, and just need this extra step to complete.

Maybe there is an easier way using BA automation, but I cannot get the absolute highs and lows as there isnt a choice in the automation store value options, only a choice to store the high and low so many mintues before and I dont want to keep my PC on all the time to get that data when it is available on the Overview but not in the BA stored values.
User avatar
conduirez
Posts: 283
Joined: Tue May 23, 2023 8:25 pm

gstar1975 wrote:
Thu Mar 21, 2024 11:59 am
After 5 years is there an update on how to do this?

I have started using Excel and would like to place opposing bets at a certain % above and below the Average prices. Excel only allows to place 1 bet so how do you clear the status cell only once and then place an opposing bet.

I have cells that calculate the odds and liability stakes at which i would like place the bets and depending on where the price is to these possible 4 price levels I would like to place the bets at (but only 1 above and 1 below).

So there are 4 scenarios:

If LTP at 2mtp is >=AVG+20% price then place a Back bet at Best Market Price using liability stake for the BMP on the Back side
If LTP at 2mtp is <AVG+20% price then place a Back bet at AVG+20% Price using liability stake for AVG+20% price
If LTP at 2mtp is <=AVG-20% price then place a Lay bet at BMP using liability stake for the BMP on the Lay side
If LTP at 2mtp is >AVG-20% price then place a Lay bet at AVG-20% Price using liability stake for AVG-20% price
Hedge at 0mtp

I have cells for these odds and stakes I just need to get BA/Excel to place the relevent bets at the relevent prices using the relevent stakes. Its easy to manually do this but I'd like to automate it, and just need this extra step to complete.

Maybe there is an easier way using BA automation, but I cannot get the absolute highs and lows as there isnt a choice in the automation store value options, only a choice to store the high and low so many mintues before and I dont want to keep my PC on all the time to get that data when it is available on the Overview but not in the BA stored values.

Can you write VBA at all gstar?

It is easy to write cell functions for what you want using cell formulas, however there is a major hiccup using the BA countdown timer to the event in Excel, in that the BA countdown timer can miss actual times and may not count every second. So if you set a cell to do something when the timer hits 2 minutes to go, if the timer jumps from 2 minutes and 1 second to go to 1 minute and 59 seconds to go, your cell formula will not activate.

There are ways around it, but it gets very complicated very quickly.
User avatar
gstar1975
Posts: 622
Joined: Thu Nov 24, 2011 11:59 am

conduirez wrote:
Thu Mar 21, 2024 1:10 pm
gstar1975 wrote:
Thu Mar 21, 2024 11:59 am
After 5 years is there an update on how to do this?

I have started using Excel and would like to place opposing bets at a certain % above and below the Average prices. Excel only allows to place 1 bet so how do you clear the status cell only once and then place an opposing bet.

I have cells that calculate the odds and liability stakes at which i would like place the bets and depending on where the price is to these possible 4 price levels I would like to place the bets at (but only 1 above and 1 below).

So there are 4 scenarios:

If LTP at 2mtp is >=AVG+20% price then place a Back bet at Best Market Price using liability stake for the BMP on the Back side
If LTP at 2mtp is <AVG+20% price then place a Back bet at AVG+20% Price using liability stake for AVG+20% price
If LTP at 2mtp is <=AVG-20% price then place a Lay bet at BMP using liability stake for the BMP on the Lay side
If LTP at 2mtp is >AVG-20% price then place a Lay bet at AVG-20% Price using liability stake for AVG-20% price
Hedge at 0mtp

I have cells for these odds and stakes I just need to get BA/Excel to place the relevent bets at the relevent prices using the relevent stakes. Its easy to manually do this but I'd like to automate it, and just need this extra step to complete.

Maybe there is an easier way using BA automation, but I cannot get the absolute highs and lows as there isnt a choice in the automation store value options, only a choice to store the high and low so many mintues before and I dont want to keep my PC on all the time to get that data when it is available on the Overview but not in the BA stored values.

Can you write VBA at all gstar?

It is easy to write cell functions for what you want using cell formulas, however there is a major hiccup using the BA countdown timer to the event in Excel, in that the BA countdown timer can miss actual times and may not count every second. So if you set a cell to do something when the timer hits 2 minutes to go, if the timer jumps from 2 minutes and 1 second to go to 1 minute and 59 seconds to go, your cell formula will not activate.

There are ways around it, but it gets very complicated very quickly.
I have it set to trigger if the cell with the timer is less than 2mins and it works. So no problem there. I just need to place 2 opposing bets and need to know how to clear the cell automatically, and place an opposing bet at a specific price worked out in formula from the workbook.
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”