PureBytes Links
Trading Reference Links
|
Both formulas posted above give slightly different results than the code posted on this forum in the past. Here is Alan Hull's Australian website:
http://www.justdata.com.au/Journals/AlanHull/hull_ma.htm
And here is the old code:
http://finance.groups.yahoo.com/group/amibroker/message/91767
Lester
--- In amibroker@xxxxxxxxxxxxxxx, "Herman" <psytek@xxx> wrote:
>
> I have been playing with the version below, would be interesting to know if
> it matches MetaStock results:
>
> GraphXSpace = 10;
>
> Plot(C,"",1,128);
>
> function HullMaFunction( P, Periods, Delay )
> {
> X = 2 * WMA(P,round(Periods/2)) - WMA(P,Periods);
> HullMA = WMA(X,round(sqrt(Periods)));
> HullMA = Ref(HullMA,-Delay);
> return HullMa;
> }
>
> Delay = Param("Delay",1,0,5,1);
> Periods = Param("Periods",10,1,100,1);
>
> HMA = HullMaFunction( C, Periods, Delay );
> Plot(C,"",1,128);
> Plot(HMA,"",9,1);
>
>
>
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On
> Behalf Of ianjw2
> Sent: December 30, 2006 7:29 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Hull Moving Averages
>
>
> I've only just become aware of the Hull Moving Average.
> It seems to be on top of the normal MA lag and manages to maintain nice
> smoothing at the same time.
>
> Has anyone done any AFL code for it and is willing to share?
>
> MetaStock Formula
> period:=Input("Period",1,200,20) ;
> sqrtperiod:=Input("Square Root of Period",1,20,4);
> Mov(2*(Mov(C,period/2,W))-Mov(C,period,W),sqrtperiod,W);
>
> Above is the Metastock code, but I have no idea how to convert it.
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.0/610 - Release Date: 12/30/2006 2:59 PM
|