PureBytes Links
Trading Reference Links
|
Tim,
Thanks for the introduction to Cum(1). I dropped the If( , , ) function and
made an expert advisor with a symbol to plot "n" bars back. Works great.
Now I can see at a glance where the tail end of various moving averages are.
Regards,
Chuck
-----Original Message-----
From: TKruzel <TKruzel@xxxxxxxxxxxxxxxx>
To: metastock@xxxxxxxxxxxxx <metastock@xxxxxxxxxxxxx>
Date: Monday, December 21, 1998 12:26 PM
Subject: Re: Formula for n periods ago
>
>The following function will plot a 1 (TRUE) when the current bar is
>N bars from the last bar. A 0 (FALSE) is plotted everywhere else.
>
>N:=4;
>NBarsFromLast:=If(Cum(1)=LastValue(Cum(1))-N,1,0);
>NBarsFromLast;
>
>Regards,
>Tim
>
|