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

Notification

Icon
Error

Options
Go to last post Go to first unread
moneypick  
#1 Posted : Thursday, March 2, 2006 5:34:25 PM(UTC)
moneypick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 32

Respected Members, I want to convert following two condition in metastock code: 1. Buy above the Buy Signals High only or Sell Below the Sell Signals Low only. 2. Break above the High in case of Buy signal & vice versa should within 2 trading sessions. Buy and Sell formula : Buy when Cross(Fml("MA1"),Fml("MA2")) Sell when Cross(Fml("MA2"),Fml("MA1")) Please guide me, Thx, (moneypick)
Justin  
#2 Posted : Thursday, March 9, 2006 3:23:41 PM(UTC)
Justin

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 9/13/2004(UTC)
Posts: 673
Location: Salt Lake City, UT

I don't understand your second condition. I believe your first condition can be written as follows: Buy X:=ValueWhen(1,Cross(Fml("MA1"),Fml("MA2")),H); C>X Sell X:=ValueWhen(1,Cross(Fml("MA2"),Fml("MA1")),L); C<X
wiked  
#3 Posted : Tuesday, March 21, 2006 3:16:08 PM(UTC)
wiked

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/27/2005(UTC)
Posts: 31

If I understand your conditions, you want to buy above the high of the day the cross occured, if it occurs within 2 bars of the cross. This would be written as: cross(H,ValueWhen(1,Cross(Fml("MA1"),Fml("MA2")),H)) AND alert(Cross(Fml("MA1"),Fml("MA2")), 3 ) I used 3 in the alert so the cross can have occured on either of the two bars before this bar
moneypick  
#4 Posted : Tuesday, March 21, 2006 5:30:06 PM(UTC)
moneypick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 32

Yes =D> Thanks wiked Bro
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.