MERHABA,
varsayılan değerleri ile
al
coeff:=2;
MovPeriod:=8;
periods:=10;
Periodr:=14;
A:=0.7;
i:=if(c>=Ref(c,-1),c-Ref(c,-1),0);
i2:=if(c<Ref(c,-1),Ref(c,-1)-c,0);
AvgUp:=MOV(i,Periodr,S);
AvgDown:=MOV(i2,Periodr,S);
AvgUpc:=MOV(i,Periodr,ww);
AvgDownc:=MOV(i2,Periodr,ww);
AvgUpH:=(AvgUp*(periodr-1)+if(H>Ref(c,-1),H-Ref(c,-1),0))/periodr;
AvgDownH:=(AvgDown*(periodr-1)+if(H<Ref(c,-1),Ref(c,-1)-H,0))/periodr;
AvgUpL:=(AvgUp*(periodr-1)+if(L>Ref(c,-1),L-Ref(c,-1),0))/periodr;
AvgDownL:=(AvgDown*(periodr-1)+if(L<Ref(c,-1),Ref(c,-1)-L,0))/periodr;
rsc:=AvgUpc/AvgDownc;
rsic:=if(rsc=-1,0,(100-(100/(1+rsc))));
rsh:=AvgUph/AvgDownh;
rsih:=if(rsh=-1,0,(100-(100/(1+rsh))));
rsl:=AvgUpl/AvgDownl;
rsil:=if(rsl=-1,0,(100-(100/(1+rsl))));
TR:=max(rsih-rsil,max(abs(rsih-REF(rsic,-1)),abs(rsil-REF(rsic,-1))));
ATRSI:=Mov(TR,periods,s);
K:=TILL(rsic,MovPeriod,A);
OFFSET:=coeff*ATRSI;
STR:=K+OFFSET;
STS:=K-OFFSET;
FUB:=IF(STR<PREV OR REF(K,-1)>PREV,STR,PREV);
FLB:=IF(STS>PREV OR REF(K,-1)<PREV,STS,PREV);
PMax:=IF(PREV=REF(FUB,-1) AND K<FUB,FUB,IF(PREV=REF(FUB,-1) AND K>FUB,FLB,IF(PREV=REF(FLB,-1) AND K>FLB,FLB,IF(PREV=REF(FLB,-1) AND K<FLB,FUB,FUB))));
CROSS(K,PMax)
sat
coeff:=2;
MovPeriod:=8;
periods:=10;
Periodr:=14;
A:=0.7;
i:=if(c>=Ref(c,-1),c-Ref(c,-1),0);
i2:=if(c<Ref(c,-1),Ref(c,-1)-c,0);
AvgUp:=MOV(i,Periodr,S);
AvgDown:=MOV(i2,Periodr,S);
AvgUpc:=MOV(i,Periodr,ww);
AvgDownc:=MOV(i2,Periodr,ww);
AvgUpH:=(AvgUp*(periodr-1)+if(H>Ref(c,-1),H-Ref(c,-1),0))/periodr;
AvgDownH:=(AvgDown*(periodr-1)+if(H<Ref(c,-1),Ref(c,-1)-H,0))/periodr;
AvgUpL:=(AvgUp*(periodr-1)+if(L>Ref(c,-1),L-Ref(c,-1),0))/periodr;
AvgDownL:=(AvgDown*(periodr-1)+if(L<Ref(c,-1),Ref(c,-1)-L,0))/periodr;
rsc:=AvgUpc/AvgDownc;
rsic:=if(rsc=-1,0,(100-(100/(1+rsc))));
rsh:=AvgUph/AvgDownh;
rsih:=if(rsh=-1,0,(100-(100/(1+rsh))));
rsl:=AvgUpl/AvgDownl;
rsil:=if(rsl=-1,0,(100-(100/(1+rsl))));
TR:=max(rsih-rsil,max(abs(rsih-REF(rsic,-1)),abs(rsil-REF(rsic,-1))));
ATRSI:=Mov(TR,periods,s);
K:=TILL(rsic,MovPeriod,A);
OFFSET:=coeff*ATRSI;
STR:=K+OFFSET;
STS:=K-OFFSET;
FUB:=IF(STR<PREV OR REF(K,-1)>PREV,STR,PREV);
FLB:=IF(STS>PREV OR REF(K,-1)<PREV,STS,PREV);
PMax:=IF(PREV=REF(FUB,-1) AND K<FUB,FUB,IF(PREV=REF(FUB,-1) AND K>FUB,FLB,IF(PREV=REF(FLB,-1) AND K>FLB,FLB,IF(PREV=REF(FLB,-1) AND K<FLB,FUB,FUB))));
CROSS(PMax,K)
şeklinde kullanabilirsiniz
bilgilerinize