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

Notification

Icon
Error

Options
Go to last post Go to first unread
lilly  
#1 Posted : Wednesday, September 7, 2005 1:48:12 AM(UTC)
lilly

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/27/2005(UTC)
Posts: 17

I would like to code Metastock to exit part of the position if a certain profit threshold is attained whether in % or $ terms. Can anyone help please?
Patrick  
#2 Posted : Thursday, September 8, 2005 3:17:30 AM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Try something like : Buy:={Buy Formula}; C-ValueWhen(1,Buy,C) >= 10 {for 10 dollars for example } This only works if your buy condition is like a cross or similar ... Post these types of Questions in our Plug ins and Formulae section ... Patrick :mrgreen:
lilly  
#3 Posted : Thursday, September 8, 2005 4:19:06 AM(UTC)
lilly

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/27/2005(UTC)
Posts: 17

Thank you for the reply. I tried something like you mentioned already only that will allow me to exit the totality of the position once a $10 profit is reached (from your example). What I would like to do is sell only half of my position and keep the other half to trail with a volatility based trailing stop for example. Is this possible using code from MS. I think I would need to reference cost of the transaction at purchase date and then once this cost has increased by a certain % or $ amount sell half of the position. Only I'm not sure how to do this...
Patrick  
#4 Posted : Thursday, September 8, 2005 4:22:25 AM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Well you will notice I start a lot of project and it takes me a while to complete them but what you are describing is part of the system tester simulation functions I'm planning on creating ... If you can wait another month then I will most likely have the perfect solution for you ... Patrick :mrgreen:
lilly  
#5 Posted : Thursday, September 8, 2005 4:33:06 AM(UTC)
lilly

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/27/2005(UTC)
Posts: 17

I do not have a problem with waiting another month or so as I am unable to code what I described earlier anyway. I do really appreciate the effort though. Where will I find the answer. Do I have to check in a particular forum or something?
Patrick  
#6 Posted : Thursday, September 8, 2005 2:57:59 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
It will be in the forum dll section ... Just check it every once in a while but chances are that I will make an announcement when this project is done :D Patrick :mrgreen:
Pratik  
#7 Posted : Sunday, August 3, 2008 5:31:09 PM(UTC)
Pratik

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 5/27/2008(UTC)
Posts: 4

Hi All,

Is anyone aware of a solution to this question that was posted back in 2005? Looking for a way to exit half of the position based on one exit rule and the other half based on a second exit rule in system tester. Patrick had mentioned some sort of solution in Forum DLL.

Thanks,

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.