- Katılım
- 23 Eki 2020
- Mesajlar
- 1,823
Relative Strength Index RSI
kaynak
BY UUFUK
Kod:
n:=14; nw:=HOUR()<>ref(HOUR(),-1); p1:=1/n;
c1:=valuewhen(1,nw,ref(c,-1)); c2:=valuewhen(2,nw,ref(c,-1));
po:=if(nw and (c1-c2)>0,c1-c2,0); neg:=if(nw and (c1-c2)<0,c2-c1,0);
x1:=If(nw,p1*po+((1-p1)*PREV),PREV); x2:=If(nw,p1*(neg)+((1-p1)*PREV),PREV);
100- 100/((x1/x2)+1):30:70
BY UUFUK