Trailing Stop Clarity
Author: CandCB
Creation Date: 2/19/2009 9:25 AM
profile picture

CandCB

#1
I use a trailing stop
SellAtTrailingStop(bar + 1, p, amount, xTrail);
When running live, the alert shows a STOP order and stages it instead of a stop loss order. It seems that WL wants me to constantly submit, cancel, and resubmit stop orders while the trade is active. If I edit the order to a stop loss order before submitting it, the alerts continue.

Is this the way it was designed or am I doing something wrong?

One consequence of this is that the strategy and real life get out of sync. That is, I am out of a position with a trailing stop, and WL thinks I am still in the trade. Is there a way to resync during real time trading?

profile picture

Cone

#2
QUOTE:
alert shows a STOP order and stages it instead of a stop loss order.
What's the difference? Stop orders are stop orders. They don't know if you're going to lose or not.

Re: TrailingStop
amount is the actual stop price. If that price doesn't change, then the orders don't either.
If amount is lower than the current trigger price, then nothing changes. However, if amount is higher than the current trigger price, then the order order is canceled and replaced with the new order price.

If you want a fixed stop loss, use either SellAtTrailingStop or SellAtStop, but don't change the trigger price!
profile picture

CandCB

#3
Sorry - the sentence should have read "it creates a Stop order instead of Trailing stop order" From the code snippet I included you can see I am using a trailing stop.

My questions are still valid.
profile picture

Cone

#4
I explained how TrailingStop orders work. What are you still confused about?
profile picture

CandCB

#5
A Trailing stop order is triggered by my code.
I expect to see a Staged order for a trailing stop which when placed automatically trails the highest price by the set amount.

But this is what appears to be happening:
When triggered, the Alert stages a Stop order (not a Trailing Stop) at the target price. As the price moves, Alerts are continually generated and staged for another stop at the new price. Of course I have to cancel the previous stop first.

My question - Is this the way it was designed or am I doing something wrong?


profile picture

Cone

#6
Yes, it's designed that way.

Look, a trailing stop is nothing more than a regular stop order that rachets in the direction of trade. I explained it above.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).