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 #

Moving Average - Fractal Adaptive (FAMA) by John Ehlers

John Ehlers' article in this issue, "Fractal Adaptive Moving Averages," introduces
an indicator of the same name. In his indicator formula, he restricts the number of periods to an even number. The formula in MetaStock avoids this restriction by asking for the smaller time frame. This number is then used for the two half-interval calculations and is then doubled for the full interval calculation. The formula for this indicator and the steps to include it in MetaStock are presented here. To enter this indicator into MetaStock:

  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 input the following formula:


Moving Average - Fractal Adaptive (FAMA)

y:=Input("sample time periods",1,20,8);
y2:=2*y;
n1:=(HHV(H,y)-LLV(L,y))/y;
n2:=Ref((HHV(H,y)-LLV(L,y))/y,-y);
n3:=(HHV(H,y2)-LLV(L,y2))/y2;
x:=(Log(n1+n2)-Log(n3))/Log(2);
xt:=Exp(-4.6*(x-1));
x1:=If(xt<0.1,0.1,If(xt>1,1,xt));
x2:=1-x1;
x3:=If(Cum(1)=y2,
(MP() * x1) + (Ref(MP(),-1) * x2),
(MP() * x1) + (PREV * x2));
x3;

 

--William Golson,
Equis International www.equis.com

Source / From: TOP
http://www.traders.com

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!