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

Notification

Icon
Error

Options
Go to last post Go to first unread
Shalafi  
#1 Posted : Monday, April 12, 2010 7:04:46 AM(UTC)
Shalafi

Rank: Newbie

Groups: Registered, Registered Users
Joined: 4/12/2010(UTC)
Posts: 2

I'm kind of new in MetaStock coding. I want to ask you a question about fixed take profit and fixed stop loss. i read the discussion about the topic in the forum and can't understand exactly. My problem is : 1) i have Buy Long condition : (s means smaller) ref(o,-2) (s) ref(c.-2) and ref(c,-2) (s) c something like that. Suppose this condition became true at the price of 1.4540, and when the price comes to 1.4560 (with tp) or 1.4520(with sl) i want to exit. But when this buy condition becomes true after and after the price changes so the prices never come to sl or tp points. What i am trying to ask you is i can not keep the price until its come to take profit or stop loss point I tried to write something like that; Buy:=ValueWhen(1,Ref(o,-2) (s) ref(c,-2) and ref(c,-2) (s) c, ref(c,-1)) TP := Buy + .0025 ; TPL := Cross(C,TP); TPL for the take profit but Buy value changes the condition is true. I want it to change if the exit condition is true. Please help me, Thank you..
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.