Cinque metodi avanzati filtri per lo smussamento delle serie storiche AMA, ARSI, Ehlers, Kalman, T3 valide alternative alle classiche medie mobili.
T3
Periods:=Input("Time Periods:",1,63,5);
a:=Input("Hot:",0,2,.7);
e1:=Mov(P,Periods,E);
e2:=Mov(e1,Periods,E);
e3:=Mov(e2,Periods,E);
e4:=Mov(e3,Periods,E);
e5:=Mov(e4,Periods,E);
e6:=Mov(e5,Periods,E);
c1:=-a*a*a;
c2:=3*a*a+3*a*a*a;
c3:=-6*a*a-3*a-3*a*a*a;
c4:=1+3*a+a*a*a+3*a*a;
c1*e6+c2*e5+c3*e4+c4*e3;
AMA
Periods := Input("Time Periods:",1,1000, 10);
Direction := CLOSE - Ref(CLOSE,-periods);
Volatility := Sum(Abs(ROC(CLOSE,1,$)),periods);
ER := Abs(Direction/Volatility);
FastSC := 2/(2 + 1);
SlowSC := 2/(30 + 1);
SSC := ER * (FastSC - SlowSC) + SlowSC;
Constant := Pwr(SSC,2);
AMA := If(Cum(1) = periods +1, Ref(CLOSE,-1) + constant * (CLOSE - Ref(CLOSE,-1)),PREV + constant * (CLOSE - PREV));
AMA
ARSI
war:=Input("Time Periods:",1,1000, 20);;
SC:=(Abs(RSI(war)/100 - 0.5)*2);
ARSI:=If(Cum(1)<war,C,PREV+SC*(C-PREV));
Kalman
PRICEE:=C;
Smooth:=.13785*(2*PriceE - Ref(PriceE,-1)) + .0007*(2*Ref(PriceE,-1) - Ref(PriceE,-2)) + .13785*(2*Ref(PriceE,-2) -Ref(PriceE,-3)) +
1.2103*PREV - .4867*Ref(PREV,-1);
SMOOTH;
ti:= 15;
pr:= MP();
coef:= Abs(pr - Ref(pr,-5));
Sum(coef*pr,ti)/Sum(coef,ti)
Esempi
Titolo Generali
Titolo : Seat Pagine Gialle
Titolo : Generali
Successivo: Cicle
Sommario: Indice