How to add a trailing stop relative to price / profit target

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
Philosoraptor
Posts: 5
Joined: Wed Aug 23, 2017 11:42 am

Hi, I’m new to Bet Angel and this is my first post. I would be grateful for any help or insights…

In Guardian, I have created an automation rule with certain conditions that lays a favourite (designed for head-to-head sports like tennis, limited overs cricket, etc, i.e. with a winner or loser, no draws). The second rule says to close out the trade when the favourite’s lay price drifts out to above 2, i.e. when in effect it is no longer the favourite. However, at this point, rather than automatically closing out the trade for a profit, I need an additional rule(s) that allows the trade to follow the price up if it continues to drift or closes out with a protective stop set at a trailing ‘N’ ticks if and when the price reverses.

In other words, once a favourite’s lay trade is up and running and the price hits 2.01, the proposed rule should arm with a contingent trigger of a trailing stop at, say, 5 ticks. Therefore, for example, if the price immediately reversed, it would trigger to close out the trade at 1.96. If it continued to drift out to, say, 2.20 before reversing, it would trigger to close out the trade at 2.15.

The rambling stops here - I hope I have made myself clear!

Cheers.
Philosoraptor
Posts: 5
Joined: Wed Aug 23, 2017 11:42 am

N.B. I realise that tick numbers between 2 and 3 should be even after the decimal point, i.e. not 2.01 but 2.02, 2.04, etc.
User avatar
Dallas
Posts: 22728
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Short answer is it cant be done exactly how you have asked, a trailing stop can only be triggered when a opening bet is matched.

It is possible to use a rule as a stop and arm it when a price drifts above 2.0 so its ready if it drops back below but this can trail in the way you want.
Philosoraptor
Posts: 5
Joined: Wed Aug 23, 2017 11:42 am

Many thanks for your prompt reply. A shame that it can't be done, as profit / price targets with trailing stops are a common feature in rules-based financial trading.
User avatar
Dallas
Posts: 22728
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Philosoraptor wrote:
Thu Aug 24, 2017 6:27 pm
Many thanks for your prompt reply. A shame that it can't be done, as profit / price targets with trailing stops are a common feature in rules-based financial trading.
Do they not start from when you open a position? - rather than you open a position let it move freely until it passes a certain price then have a trailing stop kick in and start trailing the move?
Philosoraptor
Posts: 5
Joined: Wed Aug 23, 2017 11:42 am

I'm not 100% sure what you mean. What I can say is that I have some experience of using the TradeStation platform to day trade and swing trade and, for example, its off-the-shelf 'percent (profit) trailing' strategy allows you to set a minimum profit target and then a maximum % trailing profit target, enabling one "to place an order to exit all shares...once the position has retraced a specified percentage amount of the position's highest profit value, once a profit floor amount in dollars has been reached."

As stocks all have different values, you would want to use % profit as above. You could do the same for betting, however, I was thinking in my original request that as the range of odds/prices is fixed on Betfair whatever the market, I would just use a price target (i.e. of over 2), which would effectively act as the profit floor in the aforementioned TradeStation strategy to arm the trigger and then trail the move as per a user-defined maximum profit target/price with N trailing ticks. Something along those lines.

It would be a nice facility to have though, wouldn't it? :mrgreen:
User avatar
Dallas
Posts: 22728
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Its possible that when you open a trade/position a closing bet is placed at X ticks (pips in financials) ahead ready to close/green up if the odds get there while at the same time have a trailing stop that also triggers should the price reverse X ticks or %

The only thing that is not possible from your opening question is that the trailing stop loss only activates after the price has already moved past a certain point - it has to be active and able to trigger as soon as the position is opened

The bottom post of this thread shows an example of using the trailing stop
http://www.betangel.com/forum/viewtopic ... 47&t=11746
Philosoraptor
Posts: 5
Joined: Wed Aug 23, 2017 11:42 am

Ok, I'll take a look - many thanks for taking the trouble to reply in depth.
User avatar
alexg
Posts: 5
Joined: Tue Apr 17, 2018 1:54 pm

Hey Dallas sorry to revive this old thread im trying to learn the proper way to use trailing stops in betangel.
I have this example and I would like you to help me here to understand.

I place a back bet and gets matched at 3.0 with an offset of 50 ticks and a trailing stop trigger of 10 and place bet of 15
If the price start shortening will the offset of 50 move too? So if for example the horse goes and wins the race will the 50 ticks offset move to 1.01 and the stop loss to 1.16? Or it will just reach the 50 ticks target (2.0 odds) and that's all?

In other words if I use an offset bet with trailing stop will I get the full profit if the horse wins the race?

I hope you can understand what I mean
Thank you for your help!
User avatar
Dallas
Posts: 22728
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

alexg wrote:
Thu Aug 02, 2018 10:50 pm
Hey Dallas sorry to revive this old thread im trying to learn the proper way to use trailing stops in betangel.
I have this example and I would like you to help me here to understand.

I place a back bet and gets matched at 3.0 with an offset of 50 ticks and a trailing stop trigger of 10 and place bet of 15
If the price start shortening will the offset of 50 move too? So if for example the horse goes and wins the race will the 50 ticks offset move to 1.01 and the stop loss to 1.16? Or it will just reach the 50 ticks target (2.0 odds) and that's all?

In other words if I use an offset bet with trailing stop will I get the full profit if the horse wins the race?

I hope you can understand what I mean
Thank you for your help!

The offset never moves, its only the trailing stop that moves
So in your example, you will be matched at 2.0 if the price trades there before triggering and being matched by your stop
User avatar
alexg
Posts: 5
Joined: Tue Apr 17, 2018 1:54 pm

Dallas wrote:
Fri Aug 03, 2018 8:33 am

The offset never moves, its only the trailing stop that moves
So in your example, you will be matched at 2.0 if the price trades there before triggering and being matched by your stop
Hey Dallas thank you for your reply. Is there any workaround for that? My goal is to get the full profit if the horse but still have some safety with a stop loss
Thank you
User avatar
Dallas
Posts: 22728
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

alexg wrote:
Fri Aug 03, 2018 11:50 am
Dallas wrote:
Fri Aug 03, 2018 8:33 am

The offset never moves, its only the trailing stop that moves
So in your example, you will be matched at 2.0 if the price trades there before triggering and being matched by your stop
Hey Dallas thank you for your reply. Is there any workaround for that? My goal is to get the full profit if the horse but still have some safety with a stop loss
Thank you
What you're effectively asking is for the offset to continually be pushed forward so just using a large number of offset ticks to begin with (ie, 200 ticks) to put the offset at 1.01 would be the same thing
User avatar
alexg
Posts: 5
Joined: Tue Apr 17, 2018 1:54 pm

Dallas wrote:
Fri Aug 03, 2018 12:03 pm
alexg wrote:
Fri Aug 03, 2018 11:50 am
Dallas wrote:
Fri Aug 03, 2018 8:33 am

The offset never moves, its only the trailing stop that moves
So in your example, you will be matched at 2.0 if the price trades there before triggering and being matched by your stop
Hey Dallas thank you for your reply. Is there any workaround for that? My goal is to get the full profit if the horse but still have some safety with a stop loss
Thank you
What you're effectively asking is for the offset to continually be pushed forward so just using a large number of offset ticks to begin with (ie, 200 ticks) to put the offset at 1.01 would be the same thing
Yes thats exactly what I want. In that case, if I use 200 ticks offset to get the full profit if the horse wins and then use a trailing stop trigger of 10 ticks and place at 15, If I get matched at 3.0 and the price drift back will the trailing stop trigger at 3.5 and place at 3.75? Or the trailing stop will be based on the 200 ticks offset?
User avatar
Dallas
Posts: 22728
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

alexg wrote:
Fri Aug 03, 2018 12:14 pm
Dallas wrote:
Fri Aug 03, 2018 12:03 pm
alexg wrote:
Fri Aug 03, 2018 11:50 am


Hey Dallas thank you for your reply. Is there any workaround for that? My goal is to get the full profit if the horse but still have some safety with a stop loss
Thank you
What you're effectively asking is for the offset to continually be pushed forward so just using a large number of offset ticks to begin with (ie, 200 ticks) to put the offset at 1.01 would be the same thing
Yes thats exactly what I want. In that case, if I use 200 ticks offset to get the full profit if the horse wins and then use a trailing stop trigger of 10 ticks and place at 15, If I get matched at 3.0 and the price drift back will the trailing stop trigger at 3.5 and place at 3.75? Or the trailing stop will be based on the 200 ticks offset?
The trailing stop will trigger and place at the number of ticks you have specified for it
This thread might help
viewtopic.php?f=47&t=11746&p=105442
User avatar
alexg
Posts: 5
Joined: Tue Apr 17, 2018 1:54 pm

Dallas wrote:
Fri Aug 03, 2018 12:24 pm
alexg wrote:
Fri Aug 03, 2018 12:14 pm
Dallas wrote:
Fri Aug 03, 2018 12:03 pm


What you're effectively asking is for the offset to continually be pushed forward so just using a large number of offset ticks to begin with (ie, 200 ticks) to put the offset at 1.01 would be the same thing
Yes thats exactly what I want. In that case, if I use 200 ticks offset to get the full profit if the horse wins and then use a trailing stop trigger of 10 ticks and place at 15, If I get matched at 3.0 and the price drift back will the trailing stop trigger at 3.5 and place at 3.75? Or the trailing stop will be based on the 200 ticks offset?
The trailing stop will trigger and place at the number of ticks you have specified for it
This thread might help
viewtopic.php?f=47&t=11746&p=105442
Thanks a lot!
Post Reply

Return to “Bet Angel - Automation”