通达信最牛逼的rsi指标,因为集合了很多老师的精华

[复制链接]
查看76 | 回复0 | 2022-7-24 08:07:13 | 显示全部楼层 |阅读模式

通达信最牛逼的rsi指标,因为集合了很多老师的精华

{自用RSI优化指标}
DRAWGBK(C>0,RGB(0,80,100),RGB(00,50,120),0,' ',0);
P:=5;
N1:=6;
HIGHN:=20;
LC:=REF(CLOSE,1);
RSI1:SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100,COLORWHITE;
AA:=REF(RSI1,HIGHN)=HHV(RSI1,2*HIGHN+1);
QY:=BACKSET(AA,HIGHN+1);
CC:=FILTER(QY,HIGHN) AND RSI1=HHV(RSI1,HIGHN+1);
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
GDCS2:=CONST(DINGBUTS1);
AA1:=REF(RSI1,HIGHN)=LLV(RSI1,2*HIGHN+1);
QY1:=BACKSET(AA1,HIGHN+1);
CC1:=FILTER(QY1,HIGHN) AND RSI1=LLV(RSI1,HIGHN+1);
DD1:=BARSLAST(CC1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
A1:=REF(RSI1,P)=HHV(RSI1,2*P+1);
B1:=FILTER(A1,P);
C1:=BACKSET(B1,P+1);
D1:=FILTER(C1,P);
A2:=REF(RSI1,P)=LLV(RSI1,2*P+1);
B2:=FILTER(A2,P);
C2:=BACKSET(B2,P+1);
D2:=FILTER(C2,P);
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
S11:=R11>REF(R11,1);
T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
U11:=T11>REF(T11,1);
MID:=MA(RSI1,20);
UPPER:=MID + 2*STD(RSI1,20);
LOWER:=MID - 2*STD(RSI1,20);
高:=REF(HHV(RSI1,360),1);
低:=REF(LLV(RSI1,240),1);
BIAS1:=(C-MA(C,6))/MA(C,6)*100;
BIAS2:=(C-MA(C,12))/MA(C,12)*100;
BIAS3:=(C-MA(C,24))/MA(C,24)*100;
BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离:=MA(BIAS,6);
前高:REF(RSI1,BARSLAST(D1)),COLORFF00FF,NODRAW;
前低:REF(RSI1,BARSLAST(D2)),COLOR00FF00,NODRAW;
相对能量:(RSI1-前低)/(前高-前低)*100,COLORYELLOW,NODRAW;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
RSI:RSI1,COLORLIGRAY;
DRAWBAND(RSI1,RGB(255,28,28),RSI2,RGB(28,255,28));
上轨:UPPER,COLORD8D8D8;
下轨:LOWER,COLORD8D8D8;
DRAWICON(CC,RSI1*1.03,2);
DRAWICON(CC1,RSI1*0.97,1); 
{高压:DRAWLINE(CURRBARSCOUNT=GDCS2,RSI1,CURRBARSCOUNT=GDCS1,RSI1,1) COLORBLUE,POINTDOT,LINETHICK4;
低支:DRAWLINE(CURRBARSCOUNT=DDCS2,RSI1,CURRBARSCOUNT=DDCS1,RSI1,1) COLORRED,POINTDOT,LINETHICK4;}
阻力:DRAWLINE(D1,RSI1,S11,RSI1,1),COLORYELLOW;
支撑:DRAWLINE(D2,RSI1,U11,RSI1,1),COLOR00FF00;
DRAWTEXT(CROSS(RSI1,LOWER),LOWER,'抄'),COLORFF5BAD;
DRAWTEXT(CROSS(LOWER,RSI1),LOWER,'▼'),COLORFF5BAD;
DRAWTEXT(CROSS(RSI1,高),MID,'年高'),COLORYELLOW;
DRAWTEXT(CROSS(低,RSI1),MID,'年低'),COLORYELLOW;
DRAWTEXT(CROSS(UPPER,RSI1),UPPER,'逃'),COLORYELLOW;
DRAWTEXT(CROSS(RSI1,UPPER),UPPER,'▲'),COLORYELLOW;
VM:MA(RSI1,N1),COLORFF00FF,NODRAW;
STICKLINE(CROSS(BIAS,乖离)  AND 乖离<-9,6,0,2,0),COLORRED;
DRAWTEXT(ISLASTBAR AND RSI1>REF(RSI1,1),VM,' 上'),COLORDD00FF;
DRAWTEXT(ISLASTBAR AND RSI1<REF(RSI1,1),VM,' 下'),COLORCCEE00;
P1:=3;
OB:=RSI;
A11:=REF(OB,P1)=HHV(OB,2*P1+1);
B11:=FILTER(A11,P1);
C11:=BACKSET(B11,P1+1);
D11:=FILTER(C11,P1);{高点}
A22:=REF(OB,P1)=LLV(OB,2*P1+1);
B22:=FILTER(A22,P1);
C22:=BACKSET(B22,P1+1);
D22:=FILTER(C22,P1);{低点}
R111:=BACKSET(ISLASTBAR,BARSLAST(D11)+1);
S111:=R111>REF(R111,1);
压力线:DRAWLINE(D11,OB,S111,OB,1),LINETHICK1,COLORCC33CC;

 

 

 

 

 


{自用成交量}
量(万手):VOL/10000,NODRAW,VOLSTICK,COLORGREEN;
{流通盘(亿手):CAPITAL/1000000,NODRAW,COLORLIGRAY;
年收益:FINANCE(33),NODRAW,COLORCYAN;
每股净资:FINANCE(34),NODRAW,COLORGREEN;}
股东权益:FINANCE(36),NODRAW,COLORMAGENTA;
每股公积:FINANCE(18)/1,NODRAW,COLORRED;
{换手率:VOL/CAPITAL*100,NODRAW,COLORRED;}
逐笔买卖差:(LARGEINTRDVOL-LARGEOUTTRDVOL)/10000,COLORBROWN,NODRAW;
主动买卖差:(ACTINVOL-ACTOUTVOL)/10000,COLORBROWN,NODRAW;
A01:=DYNAINFO(7);
A03:=BARSCOUNT(CLOSE);
A04:=(SMA((CLOSE / HHV(HIGH,120)),3,1) * 100);
A05:=IF((A03 > 20),A04,0);
A06:=IF((LOW > A01),0,IF((HIGH < A01),1,(((A01 - LOW) + 0.009) / ((HIGH - LOW) + 0.009))));
A07:=DMA(A06,(VOL / CAPITAL)) * 60;
A09:=IF((((A07 > 0) AND (A07 > REF(A07,1))) AND (A05 <= 88)),A07,0);
VAR1:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
VAR2:=EMA(VAR1,8);
VAR3:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
趋势:=EMA(VAR3,3)-10;
STICKLINE((A09>0) AND 趋势<40,0,V/40000,2,0),COLORMAGENTA;
A011:=DYNAINFO( 5);
A013:=BARSCOUNT(HIGH);
A014:=(SMA((HIGH / HHV(CLOSE,120)),3,1) * 100);
A015:=IF((A013 > 20),A014,0);
A016:=IF((HIGH < A011),0,IF((LOW > A011),1,(((A011 - HIGH) + 0.009) / ((LOW - HIGH) + 0.009))));
A017:=DMA(A016,(VOL / CAPITAL)) * 60;
A019:=IF((((A017 >0) AND (A017 > REF(A017,1))) AND (A015 >= 88)),A017,0);
VAR21:=3*SMA((CLOSE-HHV(HIGH,27))/(LLV(LOW,27)-HHV(HIGH,27))*100,5,1)-
2*SMA(SMA((HIGH-HHV(HIGH,27))/(LLV(LOW,27)-HHV(HIGH,27))*100,5,1),3,1);
VAR22:=EMA(VAR21,8);
VAR23:=3*SMA((HIGH-HHV(HIGH,55))/(LLV(LOW,55)-HHV(HIGH,55))*100,5,1)-
2*SMA(SMA((HIGH-HHV(HIGH,55))/(LLV(LOW,55)-HHV(HIGH,55))*100,5,1),3,1);
趋势1:=EMA(VAR23,3)-10;
STICKLINE((A019 > 0 AND (趋势1<20 OR 趋势1>REF(趋势1,1)AND 趋势1<50)),0,V/40000,2,0),COLORGREEN;
B2:DRAWICON(CROSS(ZIG(3,6),REF(ZIG(3,6),1)),V/10000,1) ;
S2:DRAWICON(CROSS(REF(ZIG(3,4),1),ZIG(3,4)),V/10000,2);
AA1:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);
预量:AA1/10000,COLORWHITE;
昨:(REF(V,1))/10000,COLORFFFF00,NODRAW;
M20:MA(VOL/10000,20),COLORGREEN;
M3:MA(VOL/10000,3),COLORYELLOW;
超B:=L2_AMO(0,2)/10000.0;
大B:=L2_AMO(1,2)/10000.0;
中B:=L2_AMO(2,2)/10000.0;
小B:=L2_AMO(3,2)/10000.0;
超S:=L2_AMO(0,3)/10000.0;
大S:=L2_AMO(1,3)/10000.0;
中S:=L2_AMO(2,3)/10000.0;
小S:=L2_AMO(3,3)/10000.0;
净流入:=(超B+大B+中B+小B)-(超S+大S+中S+小S),NODRAW;
超大单:=(超B)-(超S),NODRAW;
大单:=(大B)-(大S),NODRAW;
中单:=(中B)-(中S),NODRAW;
小单:=(小B)-(小S),NODRAW;
DAZHI:=CONST(MAX(ABS(净流入),MAX(ABS(超大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单)))))),NODRAW;
DRAWRECTREL(0,0,180,999.4,IF(120,RGB(10,0,0),0));
DRAWRECTREL(0,CONST(830-(ABS(净流入)*500/DAZHI)),30,935,IF(CONST(净流入)>0,RGB(100,0,0{255,0,255}),RGB(0,100,100)));
DRAWRECTREL(35,CONST(830-(ABS(超大单)*500/DAZHI)),65,935,IF(CONST(超大单)>0,RGB(100,0,0),RGB(0,50,0)));
DRAWRECTREL(70,CONST(830-(ABS(大单)*500/DAZHI)),100,935,IF(CONST(大单)>0,RGB(100,0,0),RGB(0,50,0)));
DRAWRECTREL(105,CONST(830-(ABS(中单)*500/DAZHI)),135,935,IF(CONST(中单)>0,RGB(100,0,0),RGB(0,50,0)));
DRAWRECTREL(140,CONST(830-(ABS(小单)*500/DAZHI)),170,935,IF(CONST(小单)>0,RGB(100,0,0),RGB(0,50,0)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.002,0.98,0,'净流   超大   大单  中单   小单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0,0,'资金搏弈 (万元)'),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.002,0.55,0,INTPART(净流入)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.036,0.30,0,INTPART(超大单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.070,0.55,0,INTPART(大单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.106,0.30,0,INTPART(中单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.145,0.55,0,INTPART(小单)),COLORWHITE;
 

1219111513.jpg

1219111513.jpg

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则