logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Maker1  
#1 Posted : Tuesday, June 4, 2013 6:01:59 PM(UTC)
Maker1

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 5/27/2013(UTC)
Posts: 2

This should be simple, but I can't figure it out. I want a simple 2% trailing stop based on the highest stock price since I entered a long trade. So if I buy a stock at 90 and it goes up to 100, the stop should be 2% below 100, or a stop of 98. If it goes up to 110, the stop should be 2% below 110 or a stop at 107.8.

I've been using this formula, but the problem is, if there is more than a 2% move in a day, it will stop me out on the day of a large rally.

perc:=2;
loss:=H*perc/100;
trail:=
If(C>PREV AND Ref(C,-1)>PREV,
Max(PREV,H-loss),
If(C<PREV AND Ref(C,-1)<PREV,
H-loss,
If(C>PREV,C-loss,C+loss)));
Trail

It seems there should be an easy formula for a trailing 2% stop. Anybody have any ideas?
mstt  
#2 Posted : Friday, June 7, 2013 8:33:50 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi maker

Here's a simple trailing stop format for the long side. You can change prices to suit. When you talk about "highest price" it's not clear to me whether you mean CLOSE or HIGH, so make changes as necessary. The Ref() function in the last line provides visual feedback of the stop being broken. Hope this helps.

{Trailing Stop Long}
perc:=2.0;
Trail:=C*(100-perc)/100;
Stop:=If(C>=PREV,Max(Trail,PREV),Trail);
Ref(Stop,-1);

Roy
Maker1  
#3 Posted : Friday, June 21, 2013 3:53:43 PM(UTC)
Maker1

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 5/27/2013(UTC)
Posts: 2

Roy, sorry for being away for so long. This is great. Thanks so much.


Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.