[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ZlagemaNZ



PureBytes Links

Trading Reference Links

Hi,

I originally posted this  formula from an article written by Joe Sharp in
January 2000  Tech analysis of Stocks & Commodities and coded by by Cheryl
Elton of Equis International  for TASC's Traders Tips.
The original code is available here:-
http://www.traders.com/Documentation/FEEDbk_docs/Archive/012000/TradersTips/
TradersTips.html#meta

And here is the MetaStock Text & Code that is available on that page:
"
 METASTOCK:-
To recreate in MetaStock 6.52 or higher the modified moving average as
explained by Joe Sharp in "More Responsive Moving Averages" elsewhere in
this issue, select "Indicator Builder" from the Tools menu, click "New" and
enter the following code, according to the desired period:

Name: Modified Moving Average

For a two-period average:
        N:=2;
        TN:=Mov(C,N,S);
        s1:=((n-1)/2)*C+((n-3)/2)*Ref(C,-1); y2:=TN+(6*S1)/((n+1)*n); y2

For a three-period average:
        N:=3;
        TN:=Mov(C,N,S);
        s1:=((n-1)/2)*C+((n-3)/2)*Ref(C,-1)+((n-5)/2)*Ref(C,-2);
y2:=TN+(6*S1)/((n+1)*n); y2

For a four-period average:
        N:=4;
        TN:=Mov(C,N,S);

s1:=((n-1)/2)*C+((n-3)/2)*Ref(C,-1)+((n-5)/2)*Ref(C,-2)+((n-7)/2)*Ref(C,-3);
y2:=TN+(6*S1)/((n+1)*n); y2

For a 10-period average:
        N:=10;
        TN:=Mov(C,N,S);

s1:=((n-1)/2)*C+((n-3)/2)*Ref(C,-1)+((n-5)/2)*Ref(C,-2)+((n-7)/2)*Ref(C,-3)
            +((n-9)/2)*Ref(C,-4)+((n-11)/2)*Ref(C,-5)+((n-13)/2)*Ref(C,-6)
            +((n-15)/2)*Ref(C,-7)+((n-17)/2)*Ref(C,-8)+((n-19)/2)*Ref(C,-9);
y2:=TN+(6*S1)/((n+1)*n); y2  "


I hope this helps.
PS The NZ on the end of the name Zlagemanz must refer to where I hail from
which was at the end of my original posting.

Regards from a long time lurker.

Chris
New Zealand


----- Original Message -----
From: "Lionel Issen" <lissen@xxxxxxxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: Monday, November 12, 2001 11:04 AM
Subject: Re: ZlagemaNZ


This indicator works fine as a zero lag ema if you use the default 10 time
periods.

I tried to run this indicator with 2 different time periods, something like
a price oscillator. When I tried to run it with a different number of
periods, the one that was already plotted changed to conform to the new time
period.

When I tried to run the indicator in a separate window, with the intention
of dragging onto the price chart, the same thing happened. Both Zlagemas had
the same time period.

Does anyone know how to change the code so that I can run this indicator
with 2 different time periods on the same chart?
Lionel Issen
lissen@xxxxxxxxxxxxxx
----- Original Message -----
From: "Andreas Grau" <agrau@xxxxxxxxxxxxxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: Sunday, November 11, 2001 11:46 AM
Subject: AW: ZlagemaNZ


> Zero Lag EMA NZ - can't help with "NZ" however.
>
> > -----Ursprüngliche Nachricht-----
> > Von: owner-metastock@xxxxxxxxxxxxx
> > [mailto:owner-metastock@xxxxxxxxxxxxx]Im Auftrag von Lionel Issen
> > Gesendet: Sonntag, 11. November 2001 15:50
> > An: metastock@xxxxxxxxxxxxx
> > Betreff: ZlagemaNZ
> >
> >
> > I found this indicator "ZlagemaNZ" in my list of indicators.
> >
> > Usually when I copy a posted indicator I include some documentation,
this
> > time I didn't.
> > Can anyone tell me what this is supposed to measure and its reliability.
> >
> > Here is the formula:
> >
> > N:=10;
> > TN:=Mov(CLOSE,N,S);
> > s1:=((n-1)/2)*C+((n-3)/2)*Ref(C,-1)+((n-5)/2)*Ref(C,-2)+((n-7)/2)*
> > Ref(C,-3)+
> > ((n-9)/2)*Ref(C,-4)+((n-11)/2)*Ref(C,-5)+((n-13)/2)*Ref(C,-6)
> > +((n-15)/2)*Ref(C,-7)+((n-17)/2)*Ref(C,-8)+((n-19)/2)*Ref(C,-9);
> > y2:=TN+(6*S1)/((n+1)*n);
> > y2
> >
> > Lionel Issen
> > lissen@xxxxxxxxxxxxxx
> >
> >
>