- Katılım
- 23 Eki 2020
- Mesajlar
- 1,828
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:
|
|
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: |