PDA

View Full Version : changing trailing stop


daz
16th February 2004, 06:24 AM
Hi All,

I have designed a system with an initial stop at 2*ATR away from the entry price and a trailing stop at 4*ATR from the close. I would like to trial this system with the following changes but am having difficulty in writing the code to facilitate this.

1. Move the initial stop to the entry price once the stock has moved say 2*ATR in a profitable direction.

2. Increase the ATR trailing stop loss as the stock moves in a profitable direction. For example, start with 2*ATR and increase this by 0.5*ATR for every 1*ATR movement in the stock, to a maximum trailing stop of 4*ATR.

Any help would be appreciated.

Thanks,
Daz.

David Samborsky
18th February 2004, 01:34 AM
2. Increase the ATR trailing stop loss as the stock moves in a profitable direction. For example, start with 2*ATR and increase this by 0.5*ATR for every 1*ATR movement in the stock, to a maximum trailing stop of 4*ATR.

The problem with this is how do you determine a profitable situation with the Metastock formula language. To determine your current profit status you need to refer your entry price at the point of entry. Not an easy thing to do with MS formula language.

daz
18th February 2004, 03:11 AM
Thanks David.

I can reference the entry price at point of entry using the ValueWhen command, however it resets when the entry trigger conditions are true again. I have found this to be one of the major limitations of Metastock.

Usually this can be overcome by writting a formula that looks for the price at the first entry trigger after an exit trigger, however, in this case the exit trigger conditions are dependant on the entry price. It gets very complex for my small brain.....

Has anyone been able to overcome this problem.

Thanks,
Daz.

dallaswm
18th February 2004, 04:41 AM
Hi Daz,

I have also been unable to get the same thing to work effectively as yet. I am beginning to think it is not actually possible. I also would like to know how to overcome the problem if anybody actually knows.

Thanks
Dallas.

David Samborsky
19th February 2004, 04:25 AM
I can reference the entry price at point of entry using the ValueWhen command, however it resets when the entry trigger conditions are true again. I have found this to be one of the major limitations of Metastock.


Precisely!

To get around it (if possible) can become very messy.