Metastock translation into PL/EL

Questions about MultiCharts and user contributed studies.
DammitJim
Posts:7
Joined:16 Jan 2007
Metastock translation into PL/EL

Postby DammitJim » 12 Feb 2007

I have an indicator to detect MACD Divergence in MetaStock that uses the code below. I cannot seem to find a way to calculate the "most recent" or "second most recent" LOW. Here's the code

{Gives the value of the most recent Price low}
LC:=LowestSince(1,X,LOW);

{Gives the value of the 2nd most recent Price low}
LP:=ValueWhen(2,x,Ref(LC,-1));

Any help would be greatly appreciated !!

Thank you,
Jim

DammitJim
Posts:7
Joined:16 Jan 2007

Postby DammitJim » 14 Feb 2007

Hello anybody there?

I forgot to include X below:

X:=Cross(hist,0) OR Cross(0,hist);

{Gives the value of the most recent Price low}
LC:=LowestSince(1,X,LOW);

{Gives the value of the 2nd most recent Price low}
LP:=ValueWhen(2,x,Ref(LC,-1));


Return to “MultiCharts”