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

Notification

Icon
Error

Options
Go to last post Go to first unread
Razhug  
#1 Posted : Wednesday, April 13, 2011 11:36:58 AM(UTC)
Razhug

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 4/13/2011(UTC)
Posts: 2

Hello, I tried a simple system where I buy a stock if the previous day was up (CLOSE > OPEN). I also put in a trailing stop loss of 50%. The system enters the trade but always exits on the same day. Why does it exit the trade on the same day? Is it because the trailing stop turns on automatically as soon as you have 0.01$ profit?
MS Support  
#2 Posted : Tuesday, April 19, 2011 5:06:46 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
The problem is the built in trailing stop. All stops are designed so they can be triggered the same day the trade is opened. For most stops, this is not an issue. However, the trailing stop has to calculate profit gained and then set the stop based on that.

On the first day, the most favorable price is used for the highest profit point. This means, for long trades, the profit is equal to the high of the bar minus the entry price. The trailing stops percentage is multiplied times the profit and the result subtracted from the high price. Then MetaStock checks to see if the stop was triggered by the low price of the bar being less than or equal to the stop level. Even if you set the stop to 100%, the entry price itself will trigger the stop. The trade is exited the stop level so it always makes a profit.

The only way to avoid this is to set the periods value of the trailing stop to a number greater than 0. This will cause the stop to not become active for that many bars. When it does become active, it will always ignore the most recent periods number of bars for purposes of calculating the profit of the trade. Thus, if you set periods to 2, on the third bar of the trade, the trailing stop will be checked for the first time. On that bar, only the profit from the first bar will be considered when calculation where the trailing stop should be set. The Low of the third bar would still be used to see if the stop was triggered.
Braun  
#3 Posted : Sunday, July 10, 2011 3:37:17 PM(UTC)
Braun

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/10/2011(UTC)
Posts: 2

Hello! I found an error in the built in trailing stop calculation. See screenshot - https://skydrive.live.co...512F&id=43577967B6C6512F!146&sc=documents Please make your comment Thanks
MS Support  
#4 Posted : Monday, July 18, 2011 3:48:42 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
Yes, the tester does work this way. As currently coded, if the stop price is within the High\Low range, the stop price will be used. The Open is only used if the entire bar gaps past the stop level.

Braun  
#5 Posted : Saturday, July 23, 2011 3:15:49 AM(UTC)
Braun

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/10/2011(UTC)
Posts: 2

MS Support wrote:
Yes, the tester does work this way.  As currently coded, if the stop price is within the High\Low range, the stop price will be used.  The Open is only used if the entire bar gaps past the stop level.

Thank you for your reply. But in reality if Open price is lower than stop price (for long position) you should always use the Open price because you can't know where to go price (above or below).
MS Support  
#6 Posted : Tuesday, July 26, 2011 2:08:49 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 92 times
Was thanked: 155 time(s) in 150 post(s)
There are many improvements we have suggested to our developers. This issue is one of them. Unfortunately, it has not been implemented yet.
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.