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

Notification

Icon
Error

Options
Go to last post Go to first unread
teofilocubilla  
#1 Posted : Saturday, October 15, 2005 6:31:27 PM(UTC)
teofilocubilla

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/15/2005(UTC)
Posts: 10

Hi, I´m trying to program a close signal saying something like:" If close price is XX pips lower than highest quote since open signal, then Close". I have read the help file and almost every function and still dont see it. Any idea anyone? Thank you Teo
Patrick  
#2 Posted : Saturday, October 15, 2005 7:39:20 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)
Use the highestsince function ... C<highestsince(1,condition,C)-[censored] Patrick :mrgreen:
teofilocubilla  
#3 Posted : Saturday, October 15, 2005 11:15:12 PM(UTC)
teofilocubilla

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/15/2005(UTC)
Posts: 10

Thanks Patrick. At least I know I was going the right way. I have been trying exactly what you propose, but still dont get the results I expect. Im missing something else. I need to get deep into MS programming language. Any book or documentation that you can recommend? Thanks again Teo
Patrick  
#4 Posted : Sunday, October 16, 2005 12:42:55 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)
Post the code you came up with so far an explain why it does not work for you ... As far as documents, the formula primer is the only thing I can think of. Patrick :mrgreen:
teofilocubilla  
#5 Posted : Wednesday, October 19, 2005 8:18:57 PM(UTC)
teofilocubilla

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/15/2005(UTC)
Posts: 10

OK. I´m back. Here´s the code. And if you don´t mind, I will make a couple of questions more. First, the formula: Dema(C,10)> Dema(C,20)AND Ref(Dema(C,10),-1)< Ref(Dema(C,20),-1) OR C<LowestSince(1,Ref(Dema(C,10),-1)< Ref(Dema(C,20),-1)AND Ref(Dema(C,10),-2)> Ref(Dema(C,20),-2),C)+0.030 Close signals would be exactly the same, only oposites signs. Therefore: Always open. What I am really trying: Buy if short Dema is above long Dema OR if Close price is 0.030 (30 pips for EUR/USD) lower than thew highest price since open position. Exactly the opposite for Short positions. I´ll leave the other question for later, Thanks in advance,
Patrick  
#6 Posted : Wednesday, October 19, 2005 8:57:31 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)
Try : {Long} 1BCD:=Dema(C,10)> Dema(C,20)AND Ref(Dema(C,10),-1)< Ref(Dema(C,20),-1); 2BCD:=C<LowestSince(1,Ref(Dema(C,10),-1)< Ref(Dema(C,20),-1)AND Ref(Dema(C,10),-2)> Ref(Dema(C,20),-2),C)+0.030; 1SCD:=Dema(C,10)<Dema(C,20) AND Ref(Dema(C,10),-1)>Ref(Dema(C,20),-1); 2SCD:=C>HighestSince(1,Ref(Dema(C,10),-1)>Ref(Dema(C,20),-1)AND Ref(Dema(C,10),-2)<Ref(Dema(C,20),-2),C)-0.030; LE:=1BCD or 2BCD; LX:=0; SE:=1SCD or 2SCD; SX:=0; B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX); B = 1 AND Ref(B,-1) <> 1 {Short} 1BCD:=Dema(C,10)> Dema(C,20)AND Ref(Dema(C,10),-1)< Ref(Dema(C,20),-1); 2BCD:=C<LowestSince(1,Ref(Dema(C,10),-1)< Ref(Dema(C,20),-1)AND Ref(Dema(C,10),-2)> Ref(Dema(C,20),-2),C)+0.030; 1SCD:=Dema(C,10)<Dema(C,20) AND Ref(Dema(C,10),-1)>Ref(Dema(C,20),-1); 2SCD:=C>HighestSince(1,Ref(Dema(C,10),-1)>Ref(Dema(C,20),-1)AND Ref(Dema(C,10),-2)<Ref(Dema(C,20),-2),C)-0.030; LE:=1BCD or 2BCD; LX:=0; SE:=1SCD or 2SCD; SX:=0; B:= ExtFml("ForumDll.Latch",LE,LX,SE,SX); B = -1 AND Ref(B,-1) <> -1 You need the forum dll latch for this to work. Patrick :mrgreen:
teofilocubilla  
#7 Posted : Wednesday, October 19, 2005 9:05:58 PM(UTC)
teofilocubilla

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/15/2005(UTC)
Posts: 10

Thanks Now, newbie questions: Do I copy and paste what you wrote in the system tester? What is the Forum dll attach? Where do I get it? Sorry for being a pain.. Thanks again Teo
Patrick  
#8 Posted : Wednesday, October 19, 2005 9:12:57 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)
First make sure you have metastock 9.0 and that you are logged on the forum. Click here http://forum.equis.com/d...?mode=drm_cat_view&cat=8 Download and install the ForumDll.exe file ( You should download the manual as well ) Then start metastock and just copy and paste the formulae I gave you in a system tester. Patrick :mrgreen:
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.