Cumulative Take Profit

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
Jampi59
Posts: 10
Joined: Thu Oct 01, 2020 9:40 am

Hello
Is it possible to build a bot that, after reaching X pounds, ended the trade and canceled the remaining positions?
Any help will be welcome
User avatar
Dallas
Posts: 23597
Joined: Sun Aug 09, 2015 10:57 pm

Jampi59
Posts: 10
Joined: Thu Oct 01, 2020 9:40 am

Thanks for your help, but that's not what I mean.
What I mean is that, for example, I will upload all horse races on a given day to Guardian and let's say in 3 runs I will make a profit X, then I don't want to trade anymore, I want the bot to cancel the remaining races.
User avatar
Dallas
Posts: 23597
Joined: Sun Aug 09, 2015 10:57 pm

So not when the trade profit reaches 'X' pounds

When the total profit for the day reaches 'X' pounds
viewtopic.php?f=56&t=25455

After importing those rules into your file you just need to add a 'Stored Value Condition' to the rule/s you want to stop and test
The stored value named 'Total_Profit' for Bet Angel
Is less than (whatever amount you want it to stop at)
User avatar
ShaunWhite
Posts: 10567
Joined: Sat Sep 03, 2016 3:42 am

Jampi59 wrote:
Mon Jul 10, 2023 1:24 pm
Thanks for your help, but that's not what I mean.
What I mean is that, for example, I will upload all horse races on a given day to Guardian and let's say in 3 runs I will make a profit X, then I don't want to trade anymore, I want the bot to cancel the remaining races.
Gotta question the logic of stopping when you have some wins but ploughing on if you're losing? Or why you'd want to stop a winning strategy?

The next market is just the next market and it's outcome doesn't depend on what went before and especially what happened to you. In trading there's no such thing as stopping, only pausing until the next one.

... I've just noticed you joined 3 yrs ago so I'll quit the lecture about the Gamblers Falacy which you'll already know and assume you have your own reasons. All the best.
Jampi59
Posts: 10
Joined: Thu Oct 01, 2020 9:40 am

Thank you for your help
My strategy very often comes to a certain profit X pounds and then, unfortunately, turns into a loss, so after making a profit X from several transactions, I want to take this profit and cancel the rest of the races. But I don't know how to deal with it.
User avatar
jamesedwards
Posts: 4370
Joined: Wed Nov 21, 2018 6:16 pm

Jampi59 wrote:
Mon Jul 10, 2023 3:40 pm
Thank you for your help
My strategy very often comes to a certain profit X pounds and then, unfortunately, turns into a loss, so after making a profit X from several transactions, I want to take this profit and cancel the rest of the races. But I don't know how to deal with it.
Shaun is correct. Either your strategy has a positive expected value or a negative one. If it is positive then there is no reason to ever stop. If it is negative then there is no reason to ever start.

Have a look at reasons why your strategy seems to work for the first few events but not others? Is it the type of event? The number or quality of participants?

Worse case scenario your strategy is actually negative expected value, in which case you're simply hoping luck is in your favour and then chasing losses. You can do this on a roulette wheel betting red or black and doubling up. 99/100 you will win a bit but when the 1/100 hits it cleans you out.
User avatar
Derek27
Posts: 25159
Joined: Wed Aug 30, 2017 11:44 am

I think I've exhausted myself going down this line. :)
Jampi59
Posts: 10
Joined: Thu Oct 01, 2020 9:40 am

You are probably right but if my strategy makes me a profit that satisfies me then I take that profit and stop trading on a given day but I have to sit at the computer and expect that profit. If I had a bot that would close this profit for me and cancel all remaining bets, it would be easier for me.
User avatar
jamesedwards
Posts: 4370
Joined: Wed Nov 21, 2018 6:16 pm

Jampi59 wrote:
Mon Jul 10, 2023 4:00 pm
You are probably right but if my strategy makes me a profit that satisfies me then I take that profit and stop trading on a given day but I have to sit at the computer and expect that profit. If I had a bot that would close this profit for me and cancel all remaining bets, it would be easier for me.
You can do this either using the method linked by Dallas above, or (easier but more manual) simply using 'the balance' attribute as a condition. So the trades only continue to trigger when your available balance remains below your preset value.
You do not have the required permissions to view the files attached to this post.
User avatar
ANGELS15
Posts: 901
Joined: Wed Mar 22, 2017 9:57 am

Derek27 wrote:
Mon Jul 10, 2023 3:53 pm
I think I've exhausted myself going down this line. :)
+1
Jampi59
Posts: 10
Joined: Thu Oct 01, 2020 9:40 am

Thank you
I'm starting to fight it
User avatar
ShaunWhite
Posts: 10567
Joined: Sat Sep 03, 2016 3:42 am

Jampi59 wrote:
Mon Jul 10, 2023 4:00 pm
You are probably right but if my strategy makes me a profit that satisfies me then I take that profit and stop trading on a given day but I have to sit at the computer and expect that profit. If I had a bot that would close this profit for me and cancel all remaining bets, it would be easier for me.
You're only getting the advice because we've all been here before. Sadly the sun setting and rising doesn't reset the probability of winning.

But James point is something to take on board, what is changing that makes it start losing? Grade of races late on the card, lunchtime punters vs afternoon pros? It's got to be something other than it being after a random guy (you) had some winning bets. If you find the reason you can trade the market types that win whenever they are, and not miss all those that happen after a few wins.
Jampi59
Posts: 10
Joined: Thu Oct 01, 2020 9:40 am

All advice is invaluable and will definitely help me in my development..
Thank you for your patience
User avatar
ShaunWhite
Posts: 10567
Joined: Sat Sep 03, 2016 3:42 am

Jampi59 wrote:
Mon Jul 10, 2023 4:53 pm
All advice is invaluable and will definitely help me in my development..
Thank you for your patience
All been there Jimpi, explaining the problem is sometimes better than asking how to do whatever solution you think you have. In general though strategies tend to either work or not, and even a great strategy won't necessarility give you a profit every day and other days everything might pay off. Try to look at your results over a rolling 7 days rather than after just a few on any given day. Short term variations, good or bad, can be very misleading.
Post Reply

Return to “Bet Angel - Automation”