Exit relative to stake

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
WelshMage
Posts: 51
Joined: Fri Sep 23, 2022 3:47 pm

Hi all

Fairly new to the automation element of Bet Angel but have managed to create some bots I am happy with.

What I would like to know is, can you exit your trade for a determined loss. What I mean is this; for example, I back over 1.5 for £20 at odds of 1.5. I have a bot that will green all selections if in profit for a certain amount. But what if I want to exit if I am currently in the red for 70% of my stake? So 70% of £20 is £14. So I need a rule that will check my position and if it is currently in a losing position of £-14, it will exit for this loss.

My thinking is I would need to store the initial stake as a stored value and go from there.

Any ideas?









3
User avatar
Derek27
Posts: 23468
Joined: Wed Aug 30, 2017 11:44 am
Location: UK

WelshMage wrote:
Tue Oct 04, 2022 1:29 pm
Hi all

Fairly new to the automation element of Bet Angel but have managed to create some bots I am happy with.

What I would like to know is, can you exit your trade for a determined loss. What I mean is this; for example, I back over 1.5 for £20 at odds of 1.5. I have a bot that will green all selections if in profit for a certain amount. But what if I want to exit if I am currently in the red for 70% of my stake? So 70% of £20 is £14. So I need a rule that will check my position and if it is currently in a losing position of £-14, it will exit for this loss.

My thinking is I would need to store the initial stake as a stored value and go from there.

Any ideas?









3
You can use the same rule, just and another OR condition that checks if your green profit is less than -70% of your stake. You can use a SV to calculate 70% of your stake and include it in the condition.
User avatar
Dallas
Posts: 22671
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

If your stake is always the same then you can just duplicate your current green up rule (by selecting it and clicking the icon with two green arrows) and change the condition to
less than -£14

If your stake is variable ie, if placing several back bet per market then you'll need a rule to Store the Value of your net stake
with whatever adjustment you want ie, plus/minus 20%

Then on your green up condition test is the value is less than the stored value
WelshMage
Posts: 51
Joined: Fri Sep 23, 2022 3:47 pm

Thanks guys

What is SV by the way?

How do I store the stake as a stored value if I want to use various size stakes?

I will have a mess around but may need further explanation.
User avatar
Derek27
Posts: 23468
Joined: Wed Aug 30, 2017 11:44 am
Location: UK

WelshMage wrote:
Tue Oct 04, 2022 4:29 pm
Thanks guys

What is SV by the way?

How do I store the stake as a stored value if I want to use various size stakes?

I will have a mess around but may need further explanation.
In addition to the link below, I'd suggest you read the automation introduction to make sure you're not missing out on any of the common tricks and treats.

https://www.betangel.com/user-guide/usi ... 3D&mw=MzIw
User avatar
Dallas
Posts: 22671
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

WelshMage wrote:
Tue Oct 04, 2022 4:29 pm
Thanks guys

What is SV by the way?

How do I store the stake as a stored value if I want to use various size stakes?

I will have a mess around but may need further explanation.
There is a ready-made rules file you can download from the shared Servants section which does what you need, even though it was created for use as a Servant you can use the rules as part of a regular automation file by changing the selection its applied to something other than Servant Context
viewtopic.php?f=58&t=20089
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

WelshMage wrote:
Tue Oct 04, 2022 4:29 pm
What is SV by the way?
Stored Value. They're like pigeon holes you can stick numbers in to use later. And the numbers you store can be the results of calculations. You name them too, so you can easily remember what you put in what SV. If the number you need is directly available you don't need them, but if not (eg 70% of current liability) then they're just the job.
WelshMage
Posts: 51
Joined: Fri Sep 23, 2022 3:47 pm

Thanks both

I will take a look at the Servant and adapt my own rule from it.
WelshMage
Posts: 51
Joined: Fri Sep 23, 2022 3:47 pm

I have to say guys you know your stuff.

I downloaded the servant automation as you suggested Dallas and modified it a little. It does exactly what I want now and all I need do is change one or two things when applying it across different types of football trades.

Many thanks again guys.

WelshMage
User avatar
Dallas
Posts: 22671
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

WelshMage wrote:
Wed Oct 05, 2022 8:42 pm
I have to say guys you know your stuff.

I downloaded the servant automation as you suggested Dallas and modified it a little. It does exactly what I want now and all I need do is change one or two things when applying it across different types of football trades.

Many thanks again guys.

WelshMage

Image
WelshMage
Posts: 51
Joined: Fri Sep 23, 2022 3:47 pm

Hi guys

I encountered a small problem when using the variation of the Servant rule to exit at a loss depending on amount of stake. I had it set at 175% and the stake was £40. So was set to lose £30 if the trade lost.

The game was Crewe v Gillingham, and I backed the Home win based on my spreadsheet performance filters for the two teams for the last 6 games. Gillingham scored and before the market settled, the odds must have gone high enough for the losing bet (based on the stored value of 170% of stake) to trigger. I checked the log and it had fired 3 times, one at 8.6 and twice at 7.8. When the market settled a Crewe win was not that high, but the damage was done, and I was in the red for £30.

Is there a way I can stop the loss trigger part of the rule firing until the market has settled down. I am thinking something like, do nothing if the market is suspended for 2 mins.

As usual, as a newbie I'm going through this automation stuff a little out of my depth while still learning. Any advice would, as always, be really appreciated.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

WelshMage wrote:
Sat Oct 08, 2022 7:58 pm
Is there a way I can stop the loss trigger part of the rule firing until the market has settled down. I am thinking something like, do nothing if the market is suspended for 2 mins.
https://www.betangel.com/user-guide/uns ... 3D&mw=MzIw

And you could also throw in a condition about the back and lay book percentages being close to 100% to see if the market is fully formed.
WelshMage
Posts: 51
Joined: Fri Sep 23, 2022 3:47 pm

Superb

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

WelshMage wrote:
Sun Oct 09, 2022 1:42 pm
Superb

Thanks
Automation is just Meccano, you know what you want to do and it's a matter of seeing if there's a part that'll do the job. First step is tea and the user guide, looking at what parts you've got in the box. :D.

But actually it is just about being mindful of how you do things, I bet you'd have glanced at the book% (or spread) before having a bet manually or waited a while once it's unsuspended. The hard part is that we're fuzzy creatures and "wait a while" rather than waiting 30.00 seconds every time.
WelshMage
Posts: 51
Joined: Fri Sep 23, 2022 3:47 pm

All these tips for me as a newbie are gold dust Shaun. :)
Post Reply

Return to “Bet Angel - Automation”