LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),7,1)/SMA(ABS(CLOSE-LC),7,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;
RSI11:IF(RSI1>RSI2,RSI1,NULL),COLORRED;
RSI12:IF(RSI1<RSI2,RSI1,NULL),COLORGREEN;
RSI21:IF(RSI1>RSI2,RSI2,NULL),COLORRED;
RSI22:IF(RSI1<RSI2,RSI2,NULL),COLORGREEN;
DRAWCOLORLINE(RSI1>RSI2,RSI1,COLORRED,COLORGREEN),LINETHICK1;
DRAWCOLORLINE(RSI1>RSI2,RSI2,COLORRED,COLORGREEN),LINETHICK1;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
BACKGROUNDSTYLE(1);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
K1:IF(K>D,SMA(RSV,3,1),NULL),COLORRED;
K2:IF(K<D,SMA(RSV,3,1),NULL),COLORGREEN;
D1:IF(K>D,SMA(K,3,1),NULL),COLORRED;
D2:IF(K<D,SMA(K,3,1),NULL),COLORGREEN;
DRAWCOLORLINE(K>D,K,COLORRED,COLORGREEN),LINETHICK1;
DRAWCOLORLINE(K>D,D,COLORRED,COLORGREEN),LINETHICK1;