Anyone want to join in on added functions

Discussion regarding the spreadsheet functionality of Bet Angel.
User avatar
conduirez
Posts: 298
Joined: Tue May 23, 2023 8:25 pm

ODPaul82 wrote:
Mon Mar 11, 2024 12:43 am
With the auto-generated VBA you've posted (I get it, you've said you're not a developer).

upTicks and downTicks have zero assigned, when a numeric data type is declared in a local function/sub it automatically is set to zero. If this were an automation to beat someone you've already lost microseconds to someone. There's no need to do that

Generally integer data types in VBA are long gone, as in 15+ years long gone, it should define long data types

Why not just use MATCH and VLOOKUP to determine the difference. Have a listing of all the prices then determine what they are and the difference from that.

Anytime that you use VBA you are giving up performance as it's an interpreted language. By using the inbuilt formula these are compiled and generally written in C++ (although from my contacts there they are re-writing stuff in rust). The in-built formulas are a hell of a lot quicker (and for anyone who says python is faster, please, honestly, let's discuss).
I have to agree with you what you said about the OP's code examples, when dealing with Excel and Bet Angel that VBA should be limited to page set ups and run as little as possible, as it will slow Excel down, Cell formulas are much quicker as you have inferred and will have less impact if kept in moderation.

However,, I would add, if you do write code in Python you would usually be sending your bets off to Betfair direct using Flumine, or better still, if you can write code in C++ or C# use these to do the same. However I have come to the conclusion that even if you do this, you should still use Bet Angel as well, for quite a number of reasons, data collection, an easy get out of jail card and manual betting on the ladder, immediately spring to mind.
sionascaig
Posts: 1074
Joined: Fri Nov 20, 2015 9:38 am

Interesting discussion...

I'm still a fan of using automation whenever possible as don't have the skills to go down some of the coding roots and certainly prefer that to hooking up an excel spreadsheet.

But back to the OP's idea of building up a suite of (basic) functions to help folks get stared, maybe a "quick" win is just developing the functionality to exclude certain markets / time periods within markets, say by automation that will send an alert that: market is not suitable, market is no longer suitable for scalping.

A quick scan of the forum pulled up the below post by Dallas listing some things to avoid / be aware of in relation to scalping - it would be quite straight forward to use automation to filter out / stop / close trades / start scalping etc? (as a start anyway)
Dallas wrote:
Thu Aug 11, 2016 11:07 pm
I dont do much scalping myself but when i do my general guide is.

*Don't go race to race trying to scalp everyone the sameway instead be selective and look for the race types and times that best suit this method.
*Avoid all Maidens, Novices 2yo races etc
*Avoid races with short priced fav's
*Look for a competitive h'cap or the better quality races which have the front few in the betting priced similarly (ie 4.0 - 7.0)
*Target runners trading in a tight range and ignore anything thats been trending in a direction (unless directional scalping) or has a betfair chart that looks like a heart rate monitor - or you may end up needing one!.
*Wait till the market is turning over at a decent rate somewhere around a £200 per second average increase, the quicker you can be in and out or in and scratch the better.
*Pay close attention to the previous race going in-play and especially to when it finishes - at these times there will be a influx of money as people start to take positions and this can change everything - even runners that have been rock solid all day could move several ticks at this time and never come back so best just holding back around these periods till things settle again.
* Use the Risk Meter on the Bet Angel over view screen this will give a clear indication to the overall activity - the lower the better when scalping.

and when your not doing that keep reading this forum, the BA blog and watch more video's.
User avatar
Bobajob
Posts: 182
Joined: Sun May 21, 2023 9:13 pm

NotBothered wrote:
Sun Mar 10, 2024 11:49 pm
like in this race the runner is 2.18 into 1.70 a breakout strategy would have worked but a scalper - very unlikely
1.7 out to 2 in-play with the right entry and exit criteria would be a possible L2B scalp for me ;)
Last edited by Bobajob on Mon Mar 11, 2024 12:58 pm, edited 1 time in total.
User avatar
Euler
Posts: 24816
Joined: Wed Nov 10, 2010 1:39 pm
Location: Bet Angel HQ

conduirez wrote:
Mon Mar 11, 2024 10:47 am
However,, I would add, if you do write code in Python you would usually be sending your bets off to Betfair direct using Flumine, or better still, if you can write code in C++ or C# use these to do the same. However I have come to the conclusion that even if you do this, you should still use Bet Angel as well, for quite a number of reasons, data collection, an easy get out of jail card and manual betting on the ladder, immediately spring to mind.
Are you aware Bet Angel has an API? This way can mix and match your own coding with Bet Angel and use it to interact with Betfair without having to code your own framework.
User avatar
conduirez
Posts: 298
Joined: Tue May 23, 2023 8:25 pm

Euler wrote:
Mon Mar 11, 2024 11:37 am
conduirez wrote:
Mon Mar 11, 2024 10:47 am
However,, I would add, if you do write code in Python you would usually be sending your bets off to Betfair direct using Flumine, or better still, if you can write code in C++ or C# use these to do the same. However I have come to the conclusion that even if you do this, you should still use Bet Angel as well, for quite a number of reasons, data collection, an easy get out of jail card and manual betting on the ladder, immediately spring to mind.
Are you aware Bet Angel has an API? This way can mix and match your own coding with Bet Angel and use it to interact with Betfair without having to code your own framework.
I have been looking at this Peter and must admit it appeals to me, what I really like about Bet Angel, is the speed you can get into it and take over trading manually, its important if something goes awry, when trading with your own software.

The other reason Bet Angel API is appealing to me is as you said that the framework is maintained by others, in this case yourselves. Coding is greatly simplified.

So I must admit I am really being drawn to do it all through the Bet Angel API.
User avatar
jimibt
Posts: 3675
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

conduirez wrote:
Mon Mar 11, 2024 12:31 pm
Euler wrote:
Mon Mar 11, 2024 11:37 am
conduirez wrote:
Mon Mar 11, 2024 10:47 am
However,, I would add, if you do write code in Python you would usually be sending your bets off to Betfair direct using Flumine, or better still, if you can write code in C++ or C# use these to do the same. However I have come to the conclusion that even if you do this, you should still use Bet Angel as well, for quite a number of reasons, data collection, an easy get out of jail card and manual betting on the ladder, immediately spring to mind.
Are you aware Bet Angel has an API? This way can mix and match your own coding with Bet Angel and use it to interact with Betfair without having to code your own framework.
I have been looking at this Peter and must admit it appeals to me, what I really like about Bet Angel, is the speed you can get into it and take over trading manually, its important if something goes awry, when trading with your own software.

The other reason Bet Angel API is appealing to me is as you said that the framework is maintained by others, in this case yourselves. Coding is greatly simplified.

So I must admit I am really being drawn to do it all through the Bet Angel API.
if i were still an active BA user, i'd definitely take the BA api route. you then literally can use BA as the workhorse/engine for transaction handling and code the strategy in your preferred language, thus allowing you to develop pretty detailed/maintainable strategies that can be modelled outside of BA. Therefore, if using c# (for example), you could inject the required data feed for live trading vs backtesting against sql stored tick data.

almost tempted to renew my subs just to implement a *robot* abstract class which could serve as a strategy engine. :) (semi serious!)
User avatar
Euler
Posts: 24816
Joined: Wed Nov 10, 2010 1:39 pm
Location: Bet Angel HQ

jimibt wrote:
Mon Mar 11, 2024 12:54 pm
You then literally can use BA as the workhorse/engine for transaction handling and code the strategy in your preferred language, thus allowing you to develop pretty detailed/maintainable strategies that can be modelled outside of BA. Therefore, if using c# (for example), you could inject the required data feed for live trading vs backtesting against sql stored tick data.
Y, that's why we designed it. You can just focus on the strategy.
User avatar
jimibt
Posts: 3675
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

Euler wrote:
Mon Mar 11, 2024 1:06 pm
jimibt wrote:
Mon Mar 11, 2024 12:54 pm
You then literally can use BA as the workhorse/engine for transaction handling and code the strategy in your preferred language, thus allowing you to develop pretty detailed/maintainable strategies that can be modelled outside of BA. Therefore, if using c# (for example), you could inject the required data feed for live trading vs backtesting against sql stored tick data.
Y, that's why we designed it. You can just focus on the strategy.
it weirdly circles back to this (viewtopic.php?t=12685) where i wanted to use interop to interact with the BA engine. the api would neatly provide this. at the time i ended up doing a massive amount of FRAGILE work to sort of get this working. the api plugs that gap neatly.
User avatar
jimibt
Posts: 3675
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

Euler wrote:
Mon Mar 11, 2024 11:37 am
conduirez wrote:
Mon Mar 11, 2024 10:47 am
However,, I would add, if you do write code in Python you would usually be sending your bets off to Betfair direct using Flumine, or better still, if you can write code in C++ or C# use these to do the same. However I have come to the conclusion that even if you do this, you should still use Bet Angel as well, for quite a number of reasons, data collection, an easy get out of jail card and manual betting on the ladder, immediately spring to mind.
Are you aware Bet Angel has an API? This way can mix and match your own coding with Bet Angel and use it to interact with Betfair without having to code your own framework.
is there a BA c# library that incorporates the class objects defined by the json objects?? just wondering how much re-invention of the wheel would be required in order to have 1st class objects in a library, rather than newtonsoft directly partying on the json objects. I know the library could be created along the lines of etc, etc:

Code: Select all

namespace BetAngel
{
    using System;
    using System.Collections.Generic;

    using System.Globalization;
    using Newtonsoft.Json;
    using Newtonsoft.Json.Converters;

    public partial class GetMarkets
    {
        [JsonProperty("dataRequired")]
        public string[] DataRequired { get; set; }
    }
}
but having a downloadable library of this would make development much faster

[edit] - think i've found it - BetAngelWS.AddMarketsInstruction, BetAngelWS.GetMarketsInstruction etc...;)
NotBothered
Posts: 173
Joined: Wed Jun 15, 2022 9:40 am

sionascaig wrote:
Mon Mar 11, 2024 11:19 am
Interesting discussion...

I'm still a fan of using automation whenever possible as don't have the skills to go down some of the coding roots and certainly prefer that to hooking up an excel spreadsheet.

But back to the OP's idea of building up a suite of (basic) functions to help folks get stared, maybe a "quick" win is just developing the functionality to exclude certain markets / time periods within markets, say by automation that will send an alert that: market is not suitable, market is no longer suitable for scalping.

A quick scan of the forum pulled up the below post by Dallas listing some things to avoid / be aware of in relation to scalping - it would be quite straight forward to use automation to filter out / stop / close trades / start scalping etc? (as a start anyway)
Dallas wrote:
Thu Aug 11, 2016 11:07 pm
I dont do much scalping myself but when i do my general guide is.

*Don't go race to race trying to scalp everyone the sameway instead be selective and look for the race types and times that best suit this method.
*Avoid all Maidens, Novices 2yo races etc
*Avoid races with short priced fav's
*Look for a competitive h'cap or the better quality races which have the front few in the betting priced similarly (ie 4.0 - 7.0)
*Target runners trading in a tight range and ignore anything thats been trending in a direction (unless directional scalping) or has a betfair chart that looks like a heart rate monitor - or you may end up needing one!.
*Wait till the market is turning over at a decent rate somewhere around a £200 per second average increase, the quicker you can be in and out or in and scratch the better.
*Pay close attention to the previous race going in-play and especially to when it finishes - at these times there will be a influx of money as people start to take positions and this can change everything - even runners that have been rock solid all day could move several ticks at this time and never come back so best just holding back around these periods till things settle again.
* Use the Risk Meter on the Bet Angel over view screen this will give a clear indication to the overall activity - the lower the better when scalping.

and when your not doing that keep reading this forum, the BA blog and watch more video's.
I only bet AU and NZ races so my comments refer to those

There is no point excluding via race type itself it depends on the price points in the race
Short Price F1 tend to blow out and make great scalping for ticks
This whole 4-7 only works for the higher quality races and it really a limiting factor
Tight Range targeting - well this is the very thing I am saying we need more information to decipher the markets as a candidate or not
Markets tend to gap more than turnover money here especially in smaller races -- to be determined really and maybe something to capture
In Play - well it is best to scalp from 2.20/45 second to be honest -as if a move it still happening under 30 seconds it is very likely a loss -- so some filter for amount of time will be necessary - so to trigger a trade at 50 seconds the threshold will be different

Again all this information is needed and what I was talking about is just a start until it is determined which factors tend to outweigh others

So it seems you guys are saying just build the functions moreso via excel formulas than add in other code for speed reasons -- OK will consider this - as I can do excel work on my own to some degree

Basically I am a strategy person - not a coder -- so I will bumble along and see what I can come up with

It just comes down too - that all the generic -- look at this - look at that -- does not work in the real world -- to make something work properly requires the information in real time then some analysis as to why something works or not - and if it is trackable and verifiable.
NotBothered
Posts: 173
Joined: Wed Jun 15, 2022 9:40 am

ODPaul82 wrote:
Mon Mar 11, 2024 12:43 am
With the auto-generated VBA you've posted (I get it, you've said you're not a developer).

upTicks and downTicks have zero assigned, when a numeric data type is declared in a local function/sub it automatically is set to zero. If this were an automation to beat someone you've already lost microseconds to someone. There's no need to do that

Generally integer data types in VBA are long gone, as in 15+ years long gone, it should define long data types

Why not just use MATCH and VLOOKUP to determine the difference. Have a listing of all the prices then determine what they are and the difference from that.

Anytime that you use VBA you are giving up performance as it's an interpreted language. By using the inbuilt formula these are compiled and generally written in C++ (although from my contacts there they are re-writing stuff in rust). The in-built formulas are a hell of a lot quicker (and for anyone who says python is faster, please, honestly, let's discuss).
thank you for this
Bet Angel
Bet Angel
Bet Angel
Posts: 4001
Joined: Tue Apr 14, 2009 3:47 pm

jimibt wrote:
Mon Mar 11, 2024 1:27 pm

but having a downloadable library of this would make development much faster

[edit] - think i've found it - BetAngelWS.AddMarketsInstruction, BetAngelWS.GetMarketsInstruction etc...;)
No there isn’t a downloadable library, but we do have to include unobfuscated class definitions in Bet Angel in order to implement the API (which you’ve found) so you can use them in an unsupported capacity if you wish.
NotBothered
Posts: 173
Joined: Wed Jun 15, 2022 9:40 am

so this morning I did 9 spreadsheets for HR Betting - which identify all things needed to bet win strategy (not scalping yet)

now I have to get this incorporated into the BA spreadsheet -- where it can check the values before allowing a triggered bet ...... then GH and then Scalping which is obviously more complicated as many things are yet to be determined .. and whether it can work as wanted.

the HR already works - it is my translation from other software I use which is already programmed and profitable.
NotBothered
Posts: 173
Joined: Wed Jun 15, 2022 9:40 am

Just on something else

I posted my Lay Bets somewhere else - and my record was 60 wins 5 losses over a short space of time .. all verified etc

but it is not about Manual Betting where you sit back - assess the situation - select the market - and place a bet and win .. anyone can do this given some experience

this is about whether Bet Angel itself can be programmed to have enough data available to it - where it can execute on its own and generate a profit - without someone manually determining the market to bet... in terms of scalping which is different of course -- but I am just saying manual selection is one thing -- this is another.

nothing I have seen so far - says it can - but we will see.
User avatar
jimibt
Posts: 3675
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

Bet Angel wrote:
Mon Mar 11, 2024 8:04 pm
jimibt wrote:
Mon Mar 11, 2024 1:27 pm

but having a downloadable library of this would make development much faster

[edit] - think i've found it - BetAngelWS.AddMarketsInstruction, BetAngelWS.GetMarketsInstruction etc...;)
No there isn’t a downloadable library, but we do have to include unobfuscated class definitions in Bet Angel in order to implement the API (which you’ve found) so you can use them in an unsupported capacity if you wish.
got it... will bear that in mind and will obviously be aware that change could occur between releases which could require reworking, tho of course, I guess that would be the case using JObject against string based objects too. thanks again.

Heres' how i've quickly put things together based on that info (does that look to consume your api as expected??):

Screenshot 2024-03-12 010547.png
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”