Merhabalar,
al
Periods:=10;
Fast:=2;
Slow:=30;
Pds:=Periods+1;
FastSC:=2/(Fast+1);
SlowSC:=2/(Slow+1);
{Kaufman Adaptive Moving Average}
Direction:=Abs(C-Ref(C,-periods));
Volatility:=Sum(Abs(C-REF(C,-1)),periods);
ER:=Direction/Volatility;
SSC:=ER*(FastSC-SlowSC)+SlowSC;
Constant:= POWER(SSC,2);
KAMA:=If(Cum(1) = Pds,Ref(C,-1)+Constant*(C-Ref(C,-1)),PREV+Constant*(C-PREV));
{Adaptive Moving Average}
Mltp:=Abs((C-LLV(L,Pds))-(HHV(H,Pds)-C))/(HHV(H,Pds)-LLV(L,Pds));
SSCx:=Mltp*(FastSC-SlowSC)+SlowSC;
Constantx:= POWER(SSCx,2);
AMA:=If(Cum(1) = Pds,Ref(C,-1)+Constantx*(C-Ref(C,-1)),PREV+Constantx*(C-PREV));
CROSS(KAMA, AMA)
sat
Periods:=10;
Fast:=2;
Slow:=30;
Pds:=Periods+1;
FastSC:=2/(Fast+1);
SlowSC:=2/(Slow+1);
{Kaufman Adaptive Moving Average}
Direction:=Abs(C-Ref(C,-periods));
Volatility:=Sum(Abs(C-REF(C,-1)),periods);
ER:=Direction/Volatility;
SSC:=ER*(FastSC-SlowSC)+SlowSC;
Constant:= POWER(SSC,2);
KAMA:=If(Cum(1) = Pds,Ref(C,-1)+Constant*(C-Ref(C,-1)),PREV+Constant*(C-PREV));
{Adaptive Moving Average}
Mltp:=Abs((C-LLV(L,Pds))-(HHV(H,Pds)-C))/(HHV(H,Pds)-LLV(L,Pds));
SSCx:=Mltp*(FastSC-SlowSC)+SlowSC;
Constantx:= POWER(SSCx,2);
AMA:=If(Cum(1) = Pds,Ref(C,-1)+Constantx*(C-Ref(C,-1)),PREV+Constantx*(C-PREV));
CROSS(AMA, KAMA)
iyi çalışmalar