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

[EquisMetaStock Group] Re: The Metastock code published for the APE article (TASC April 2006) incorrect?



PureBytes Links

Trading Reference Links

The posted default Average Peak Excursion formula is the same as:

Max(H-O,O-L)

....which is basically measuring the inverse relationship of the Open 
to the bar's range (H-L).  Increasing the original indicator's periods 
just increases the measured period range.

To average the "Peak Excursion", I would do this:

pds:=Input("Averaging periods for APE",1,260,21);
Mov(Max(H-O,O-L),pds,S)


I guess that the author intends to measure bar peak excursions (aka Dr 
Elder's kangaroo tails) as measured from the Open, but I would prefer 
to measure this from the (arguably more valid) Close.


jose '-)
http://www.metastocktools.com



--- In equismetastock@xxxxxxxxxxxxxxx, biobuck <no_reply@xxx> wrote:
>
> Am I the only one think that the Metastock code published is
> incorrect?
> 
> I don't see the code did anything to "AVERAGE" the peak excursion
> for a given data series.  Could anyone please confirm this?
> 
> Thanks!
> 
> biobuck
> 
> 
> 
> 
> METASTOCK: AVERAGE PEAK EXCURSION (APE) 
> 
> Chris Young's article in this issue, "The Average Peak Excursion," 
includes three formulas for calculating the rate of return. These 
formulas are listed below as indicators. 
> 
> To enter these indicators into MetaStock, follow these steps: 
> 
> 1. In the Tools menu, select Indicator Builder. 
> 2. Click New to open the Indicator Editor for a new indicator. 
> 3. Type the name of the formula. 
> 4. Click in the larger window and type in the formula. 
> 5. Click OK to close the Indicator Editor.
> Name:  Average Peak Excursion
> Formula:
> x:=Input("number of periods for APE",1,200,1);
> Max( Abs(HHV(H, x) - Ref(O, -(x-1))), Abs(LLV(L, x) - Ref(O, -(x-1)
)) )
> Name:  APE ratio
> Formula:
> x:=Input("number of periods for APE ratio",2,200,25);
> ax:= Max( Abs(HHV(H, x) - Ref(O, -(x-1))), Abs(LLV(L, x) - Ref(O, -
(x-1))) );
> a1:= Max( Abs(H - O), Abs(L - O) );
> ax / a1
> Name:  APE Alpha
> Formula:
> x:=Input("number of periods for APE",2,200,25);
> ax:= Max( Abs(HHV(H, x) - Ref(O, -(x-1))), Abs(LLV(L, x) - Ref(O, -
(x-1))) );
> a1:= Max( Abs(H - O), Abs(L - O) );
> Log( ax / a1 ) / Log( x )
> 
> These formulas can also be used in explorations, but the first line 
will need to be changed first. The Input() function only works in 
indicators. For the explorations, replace this line: 
>   
> 
>  x:=Input("number of periods for APE",2,200,25);
> with this line:
>  x:= 25;
> 
>  The number typed in after x is the number of periods used for the 
long-term Ape calculation and can be any value desired. 
>   
> 
> --William Golson 
> MetaStock Support Representative 
> Equis International (A Reuters Company) 
> 801 265-9998, www.metastock.com
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/