MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Average Peak Excursion (APE) by Chris Young

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.

Average Peak Excursion

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))) )

APE ratio

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


APE Alpha

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,

Source / From: TOP

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!