{RSI} rsi_r := (CLOSE - ref(CLOSE,-1)); rsi_rs := Wilders(if(rsi_r>0,rsi_r,0),14) / Wilders(if(rsi_r<0,Abs(rsi_r),0),14); RSIndex:= Mov((100-(100/(1+rsi_rs))),SF,E); {ATR RSI} TH :=if(Ref(RSIndex,-1) > RSIndex,Ref(RSIndex,-1),RSIndex); TL :=if(Ref(RSIndex,-1) < RSIndex,Ref(RSIndex,-1),RSIndex); TR :=TH-TL; ATRRSI:=Wilders(TR,14); DeltaATRRSI:= Wilders(ATRRSI,14)*2.618; TrLevelRSIFast:=If( RSIndex=PREV, PREV, If( ((Ref(RSIndex,-1)PREV) AND (RSIndex>PREV), Max(PREV,RSIndex - DeltaATRRSI), If( RSIndex>PREV, RSIndex - DeltaATRRSI, RSIndex + DeltaATRRSI ) ) ) ); DeltaATRRSI_2:= Wilders(ATRRSI,14)*4.236; TrLevelRSISlow:=If( RSIndex=PREV, PREV, If( ((Ref(RSIndex,-1)PREV) AND (RSIndex>PREV), Max(PREV,RSIndex - DeltaATRRSI_2), If( RSIndex>PREV, RSIndex - DeltaATRRSI_2, RSIndex + DeltaATRRSI_2 ) ) ) );