RSI指标计算方法
RSI的计算原理就是:将n日内某只股票(或股价指数)收盘价格上涨的分为一类,将收盘价格下跌的分为一类,并将其分别相加,将前者的总和作为买方的总力量,把后者的总和作为卖方的总力量。
因此,相对强弱指标的计算公式如下:ESI(n)=100×RS/(1+RS)或者RSI(n)=100-100=(1+RS);RS=几天内收市价上涨数之和的平均值/几天内收市价下跌数之和的平均值。
RSI选股指标公式
TJ1:=(C-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;
TJF:=SMA(TJ1,13,8);
TJFF:=SMA(TJ1,13,4);
AR1:=(CLOSE-LLV(LOW,120))/(HHV(HIGH,120)-LLV(LOW,120))*100;
AR2:=SMA(AR1,3,1);
AR3:=SMA(AR2,3,1);
AR4:=SMA(AR3,3,1);
MMCD:=3*(AR3-AR4);
CROSS(TJF,18);
CRSI:="RSI.RSI3#WEEK";
HRSI:=HHV("RSI.RSI1#WEEK",2);
金叉RSI:=STICKLINE(CROSS("RSI.RSI2#WEEK","RSI.RSI3#WEEK"),88,12,0.6,0);
VARA:=REF(CLOSE,1);
VARE:=SMA(MAX(CLOSE-VARA,0),6,1)/SMA(ABS(CLOSE-VARA),6,1)*100;
ARSI下:=STICKLINE(HRSI<=CRSI,HRSI,CRSI,0.1,1);
VAR1:=(CLOSE*2+HIGH+LOW)/4;
SK:=EMA(VAR1,13)-EMA(VAR1,73);
SD:=EMA(SK,2);
XG:((CROSS(SK,SD) AND SK<-0.04 AND (C-REF(C,1))/REF(C,1)>=0.03) OR (CROSS(SK,SD) AND SK<=-0.14 )
OR (CROSS(SK,SD) AND SK<=0.05 AND (V/MA(V,5)>2 OR C/REF(C,1)>0.035)) OR 金叉RSI)*20;