*************************************************************
  CORRECTION ---  misleading information about the Jurik JMA
*************************************************************

It appears Rick thought the following code was the Jurik JMA:

> function JMA( array, per ) // Jurik
> {
>     TN1 = MA( array, per );
>     s1 = 0;
> 
>     for ( i = 0; i < per; i = i + 1 )
>     {
>         s1 = s1 + ( ( per - ( 2 * i ) - 1 ) / 2 ) * Ref( array, -i );
>     }
> 
>     return TN1 + ( ( ( per / 2 ) + 1 )*S1 ) / ( ( per + 1 )*per );
> }

The above code is a combination of two parts: a simple MA and the slope of a 
linear regression line placed through a window of data points. The added slope 
is designed to counter lag. This filter is linear and not adaptive, and will 
tend to overshoot at price reversals.

JMA, in contrast, in a nonlinear, adaptive moving average.

A common mistake in comparing JMA with other filters is to set the LENGTH 
parameter the same for all.  LENGTH in JMA does not have the same meaning in a 
nonlinear filter as it would in a linear filter, so one needs to experiment to 
find a suitable value of LENGTH.

If you are interested in seeing how JMA compares against other filters, the 
easiest way is to go here ...

http://www.jurikres.com/faq/faq_ama.htm#betterthan

Mark Jurik
Jurik Research

==========================================================

--- In [email protected], Rick Osborn <ri...@...> wrote:
>
> The Gaussian is slow compared to some others.
> Here is a  comparison of four different moving averages - T3 (Tilsons 
> MA),Hull, Jurik and Gaussian.  (you need to have the gaussian plug-in to see 
> the gaussian MA - but you can comment out the plot line to see the other 
> MA's.)
> 
> The other 3 are faster than gaussian (really noticeable at higher MA periods).
> What I don't like about the Jurik MA is how it overshoots when trends change.
> For my money, the Hull MA is quite fast and smooth.
> 
> You can also check TEMA which is faster still but not as smooth.
> Here is the code
> %--------------------------------------
> 
> Plot(C,"Test stuff",colorYellow,64);
> roPeriod = Param("Period",5,1,20,1);
> 
> // Ti3 Indicator
> 
> function Ti3(price,period)
> {
> sa = 0;
> if (period <= 3)
> { sa = .88;}
> else if (period == 4)
> { sa = .81;}
> else if (period == 5)
> { sa = .77;}
> else if (period == 6)
> { sa = .75;}
> else if (period == 7)
> { sa = .73;}
> else if (period == 8)
> { sa = .72;}
> else if (period >= 9)
> { sa = .71;}
> else
> { sa = .70;}
> 
> pa=period;
> fa=2/(pa+1);
> e1a=EMA(Price,pa);
> e2a=EMA(e1a,pa);
> e3a=EMA(e2a,pa);
> e4a=EMA(e3a,pa);
> e5a=EMA(e4a,pa);
> e6a=EMA(e5a,pa);
> c1a=-sa*sa*sa;
> c2a=3*sa*sa+3*sa*sa*sa;
> c3a=-6*sa*sa-3*sa-3*sa*sa*sa;
> c4a=1+3*sa+sa*sa*sa+3*sa*sa;
> Ti3a=c1a*e6a+c2a*e5a+c3a*e4a+c4a*e3a;
> return Ti3a;
> }
> 
> 
> function HullMaFunction( P, Periods, Delay ) // Hull Moving Average
>     {
>     X = 2 * WMA(P,int(Periods/2)) - WMA(P,Periods);
>     HullMA = WMA(X,int(sqrt(Periods)));
>     HullMA = Ref(HullMA,-Delay);
>     return HullMa;
>     }
> 
> function JMA( array, per ) // Jurik
> {
>     TN1 = MA( array, per );
>     s1 = 0;
> 
>     for ( i = 0; i < per; i = i + 1 )
>     {
>         s1 = s1 + ( ( per - ( 2 * i ) - 1 ) / 2 ) * Ref( array, -i );
>     }
> 
>     return TN1 + ( ( ( per / 2 ) + 1 )*S1 ) / ( ( per + 1 )*per );
> }
> 
> 
> Plot(scGauss2ord(C,roPeriod),"Gausian",colorRed,1);
> Plot(HullMaFunction(C,roPeriod,1),"Hull",colorGreen,1);
> Plot(JMA(C,roPeriod),"Jurik",colorYellow,1);
> Plot( Ti3( C, roPeriod),"T3",colorWhite,1);
> 
> 
> 
> 
>  Best Regards
> Rick Osborn
> 
> 

Reply via email to