以下是通达信海盗RSI源码副图
海盗修改版
1、RSI2(12日):RSI2>80超买,80>RSI2>55强势,55>RSI2>20弱势,RSI2<20超卖,均有文字提示
2,在普通指标上加了波段操作提示:图中粉色是整理区,可做波段,但轻仓,红色是强势区,可加重仓位
3,RSI2金叉RSI3,是买入条件,但要参考线的颜色变化.
选股公式:选股强势区间的股票!
LC:=REF(CLOSE,1);
RSI1:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100,LINETHICK0,COLORYELLOW;
RSI2:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100,LINETHICK3,COLORGREEN;
RSI3:SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100,LINETHICK1,COLORWHITE;
A1:=EMA(C,2);
A2:=EMA(SLOPE(C,21)*20+C,42);
轻仓线:IF(A1>A2,RSI2,DRAWNULL),COLORMAGENTA,LINETHICK3;
重仓线:IF(A1>A2 AND (RSI2<20 OR RSI2>55),RSI2,DRAWNULL),COLORRED,LINETHICK3;
{基本提示}
T1:=RSI2>80;
T2:=RSI2<80 AND RSI2>55;
T3:=RSI2<55 AND RSI2>45;
T4:=RSI2<45 AND RSI2>20;
T5:=RSI2<20;
DRAWTEXT(T1>0 AND ISLASTBAR,80,'超买'),COLORWHITE;
DRAWTEXT(T2>0 AND ISLASTBAR,60,'强势'),COLORRED;
DRAWTEXT(T3>0 AND ISLASTBAR,50,'整理'),COLORWHITE;
DRAWTEXT(T4>0 AND ISLASTBAR,30,'弱势'),COLORGREEN;
DRAWTEXT(T5>0 AND ISLASTBAR,20,'超卖'),COLORWHITE;