首页 > 证券 > 股票基础入门 > rsi波段公式是什么?看完再上车!

rsi波段公式是什么?看完再上车!

作者:股票分析师 2023年9月8日

如果正确使用rsi指标,往往能够捕捉波段行情。 rsi指标是股市技术分析中的一种重要指标,我将为大家进行讲解。(内附rsi波段公式源码)


开始之前,不妨先领一波福利——机构精选的牛股榜单新鲜出炉,走过路过可别错过:速领!今日机构牛股名单新鲜出炉!bd.xuebashuocai.com


一、什么是rsi指标


rsi指标的发明者是Welles Wilder,他是一位美国投资顾问和作家,在1978年提出了这个指标,他通过比较股市最新的收盘价来衡量股票的整体趋势,这种策略的原理是用股票的价格和时间来指示股市的强弱程度。 使用rsi分析股市时,许多投资者会观察rsi的超买超卖区间来判断市场的整体状况,并做出相应的交易。


想知道手里股票好不好?点击链接一键诊股,实时解盘快人一步!【免费】测一测你的股票到底好不好?bd.xuebashuocai.com


二、rsi波段公式源码


N:=55;


 N1:=6;


 N2:=89;


WL:(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100,LINETHICK1,COLOR0000FF;


 WL3:=MA(WL,3),COLOR00FFFF;


 WLT:MA(WL,89),COLOR00FFFF,LINETHICK1;


 DRAWBAND(WL,RGB(200,50,55),WLT,RGB(0,100,50));


遵:IF(WL>=WLT,WL,DRAWNULL),COLORRED;


守:IF(WLT>=WL,WLT,DRAWNULL),COLORFF9900;


纪:IF(WL>=WLT,WLT,DRAWNULL),COLOR00FFFF;


律:IF(WLT>=WL,WL,DRAWNULL),COLOR00FF00;


 WLT1:=CROSS(WL,WLT);


 WLT11:=CROSS(WL,-10);


 WLT2:=FILTER(WLT1,8);


 SKY:10,POINTDOT,COLORFF0000,LINETHICK1;


 SEA:-10,POINTDOT,COLORFF00FF,LINETHICK1;


 DRAWICON(WLT2,WLT,23);


 DRAWICON(WLT11,SEA,15);


 T8:=FILTER(CROSS(WL,WL3) AND WL3

 DRAWICON(T8,WL,26);


 WLT3:=COUNT(WL>10,5)>=3;


 WLT33:=CROSS(10,WL);


 SEL:=WLT3 AND WLT33;


 DRAWICON(SEL,10,19);


 STICKLINE(WL>10,WL,10,0.001,0),COLOR00FF00;


 STICKLINE(WL<-10,WL,-10,0.001,0),COLORFF00FF;


 DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);


 DEA:=EMA(DIF,9);


 MACD:=(DIF-DEA)*2,COLORSTICK;


 DIF底:=LLV(DIF,120);


最底价:=L=LLV(L,120);


距今:=BARSLAST(最底价);


偏离:=IF((距今=0 AND DIF>DIF底),1,0);


 DDD:=EXIST(偏离,20) AND SLOPE(DEA,2)>=0;


 HRY:=FILTER(DDD,10);


 STICKLINE(HRY,-5,-10,3,0),COLOR00FFFF;


 DRAWTEXT(HRY,-5,'M背'),COLOR00FFFF;


 YYY:COUNT(偏离,5);


 DIF顶:=HHV(DIF,120);


最高价:=H=HHV(H,120);


距今高:=BARSLAST(最高价);


偏离高:=IF((距今高=0 AND DIF

 GGG:=EXIST(偏离高,20) AND SLOPE(DEA,2)<0;


 HRY1:=FILTER(GGG,10);


 STICKLINE(HRY1,10,5,3,0),COLORFF0000;


 DRAWTEXT(HRY1,5,'M背'),COLORFF0000;


 A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));


 B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));


 A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));


 B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));


 C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));


 D2:=REF(C,C2+1)"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));


 C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));


 D3:=REF(C,C3+1)"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));KDJ底背:FILTER(IF(B2>0,-1,0),13),NODRAW;


 STICKLINE(KDJ底背,-10,-5,3,0),COLORFF00FF;


 DRAWTEXT(KDJ底背,-5,'K背'),COLORFF00FF;


 RSI底背:FILTER(IF(B3>0,-1,0),13),NODRAW;


 STICKLINE(RSI底背,-10,-5,3,0),COLOR0000FF;


 DRAWTEXT(RSI底背,-5,'R背'),COLOR0000FF;


 KDJ顶背:FILTER(IF(D2>0,1,0),13),NODRAW;


 STICKLINE(KDJ顶背,10,5,3,0),COLORFFFF00;


 DRAWTEXT(KDJ顶背,5,'K背'),COLORFFFF00;


 RSI顶背:FILTER(IF(D3>0,1,0),13),NODRAW;


 STICKLINE(RSI顶背,10,5,3,0),COLOR00FF00;


 DRAWTEXT(RSI顶背,5,'R背'),COLOR00FF00;


 T:=IF((BARSCOUNT(C)> 7),(100)*((MA(C,7))/(LLV(MA(C,7),7)) - 1),1);


 N3:=IF((T> 0.35),6,65);


 W:=((-((100)*(HHV(H,N3) - C))/(HHV(HIGH,N3) - LLV(L,N3))));


 RV:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;


 RG:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;


 J0:=(HIGH+LOW)/2;


 QJ:=EMA(J0,3);


 J1:=IF(CLOSE>QJ,VOL,0);


 J2:=IF(CLOSE

 BB:=MA(SUM(J1-J2,22),3);


 VAR4:=SMA(RV,3,1);


 VAR5:=SMA(VAR4,3,1);


 KK:=EMA(SMA(RG,3,1),2),COLORFFFFFF;


 DD:=SMA(KK,3,1),COLOR00FFFF;


涨停:=CROSS(W,-2) AND CROSS(VAR4,VAR5) AND CROSS(KK,DD);


 STICKLINE(涨停,-10,-5,4,0)COLORRED;


 DRAWTEXT(REF("KDJ.J",1)<0 AND "KDJ.J">0,-4,'短'),COLORRED ;


 STICKLINE(REF("KDJ.J",1)<0 AND "KDJ.J">0,-10,-5,3,0),COLOR00FFFF;


 AA1:=HHV(H,55);


 BB1:=REF(H,13);


 TJ1:=AA1=BB1;


 XX:=LLV(L,55);


 YY:=REF(L,13);


 YY1:=REF(L,21);


 TJ2:=XX=YY;


 TJ3:=XX=YY1;


 XG:=TJ1 OR TJ2;


 DRAWTEXT(TJ2,-6,'离底13'),COLOR00FF00;


 STICKLINE(TJ2 ,-10,-6,2,0),COLOR00FF00;


 DRAWTEXT(TJ3,-4,'离底21'),COLOR00FFFF;


 STICKLINE(TJ3 ,-10,-4,2,0),COLOR00FFFF;


 DRAWTEXT(TJ1,-6,'离高13'),COLOR0000FF;


 STICKLINE(TJ1 ,-10,-6,2,0),COLOR0000FF;


 LV:=MA(C,24);


 HR0:=HHV(HIGH,N);


 HRY0:=LLV(LOW,N);


 HRY110:=HR0*HRY0;


 HRY330:=SQRT(HRY110);


 NS1:=C>HRY330 AND HRY330>=REF(HRY330,1) AND C>LV;


 STICKLINE(C>0,-10,-11.5,3,0),COLORFF0000;


 STICKLINE(WLT2 OR WL>WLT,-10,-11.5,3,0),COLOR00FFFF;


 STICKLINE(NS1,-10,-11.5,3,0),COLOR0000FF;


 DRAWTEXT(FILTER(NS1,21),-11,'持股'),COLORFFFFFF;


 DRAWTEXT(FILTER(WLT2 OR WL>WLT,13),-11,'买入'),COLOR0000FF;


 MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;


 DKX:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+


 16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+


 13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+


 10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+


 7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+


4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,LINETHICK2;


 MA1:=MA(DKX,6);


 STICKLINE(DKX>MA1,-12,-14,3,0),COLORRED;


 STICKLINE(DKX

关于rsi波段公式源码就先讲到这里,对于投资理财来说,系统性地学习股市知识很必要,这里有全套课程学习,简单易懂,只讲干货、不讲废话,点击链接领取课程吧:0基础到高级全套投资课程,教你从小白到高手bd.xuebashuocai.com




rsi/波段/公式源码