通达信MACDRSI副图源码
![浏览](/storage/static/pc/images/eye.png)
以下是通达信MACDRSI副图源码
{R射→→MACD
{DRAWBAND(100,RGB(100,100,100),-20,RGB(100,100,100));}
VAR1:=(MA(CLOSE,80)-MA(CLOSE,13)/3);
VAR2:=( MA((CLOSE-VAR1)/VAR1,1));
VAR3:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100;
VAR4:=SMA(VAR3,4,1);
MMA:=EMA(VAR2,12)*0.7;
MMB:=EMA(VAR2,3);
快到底:IF(LLV(MMB-MMA,12)> 0,0,-20),LINETHICK2,COLORGREEN;
底初选股:IF( CROSS(0, LLV(MMB-MMA,12)),10,0),LINETHICK0;
K:=CEILING(C/10);
DIFF:=( EMA(CLOSE,12) - EMA(CLOSE,26))/K*100+50;
DEA:=EMA(DIFF,9);
MACD:= 2*(DIFF-DEA)+50;
20,COLORGRAY,LINETHICK2;
50,POINTDOT,COLORGRAY;
80,COLORGRAY,LINETHICK2;
DRAWBAND(DIFF,RGB(100,00,00),DEA,RGB(00,200,00));
抄底:IF(快到底< 0 AND CROSS(MACD,50) AND VAR4< 18,80,0),COLORCYAN;
DRAWICON( 抄底> 0,35 ,1 );
STICKLINE(MACD< REF(MACD,1)AND MACD> 50,50,MACD,0,1),COLORGREEN;
STICKLINE(MACD< REF(MACD,1)AND MACD< 50,50,MACD,0,1),COLORFFCC33;
STICKLINE(MACD> REF(MACD,1)AND MACD< 50,50,MACD,0,1),COLORYELLOW;
STICKLINE(MACD> REF(MACD,1)AND MACD> 50,50,MACD,0,1),COLORMAGENTA;
LC:=REF(CLOSE,1);
RSI:((SMA(MAX((CLOSE - LC),0),N,1) / SMA(ABS((CLOSE - LC)),N,1))* 100),COLORMAGENTA,LINETHICK2;
RA1:=REF(RSI,N)=HHV(RSI,N*2+1);
RB1:=FILTER(RA1,N);
RC1:=BACKSET(RB1,N+1);
RD1:=FILTER(RC1,N);
GD1:=BARSLAST(RD1);
GDTS:=IF(RD1,CURRBARSCOUNT,0);
DDTS:=IF(RD2,CURRBARSCOUNT,0);
GDT1:=IF(GD1,REF(GDTS,GD1),GDTS);
DDT1:=IF(DD1,REF(DDTS,DD1),DDTS);
GDCS1:=CONST(GDT1);
GINGBUTS1:=REF(GDT1,GD1+1);
GDCS2:=CONST(GINGBUTS1);
GDCS13:=CONST(REF(RSI,GDCS1-1));
GDCS23:=CONST(REF(RSI,GINGBUTS1-1));
XG1:=BACKSET(ISLASTBAR,GDCS1);
XG2:=BACKSET(ISLASTBAR,GDCS2);
M:=2*N;
RA11:=REF(RSI,M)=HHV(RSI,M*2+1);
RB11:=FILTER(RA11,M);
RC11:=BACKSET(RB11,M+1);
RD11:=FILTER(RC11,M);
GD11:=BARSLAST(RD11);
GDTSS:=IF(RD11,CURRBARSCOUNT,0);
DDTSS:=IF(RD22,CURRBARSCOUNT,0);
GDT11:=IF(GD11,REF(GDTSS,GD11),GDTSS);
DDT11:=IF(DD11,REF(DDTSS,DD11),DDTSS);
GDCS11:=CONST(GDT11);
GINGBUTS11:=REF(GDT11,GD11+1);
GDCS22:=CONST(GINGBUTS11);
高点压力1:DRAWLINE(CURRBARSCOUNT=GDCS2,RSI,CURRBARSCOUNT=GDCS1,RSI,1) ,COLORRED,LINETHICK1;
低点支撑1:DRAWLINE(CURRBARSCOUNT=DDCS2,RSI,CURRBARSCOUNT=DDCS1,RSI,1),COLORRED,LINETHICK1;
高点压力2:DRAWLINE(CURRBARSCOUNT=GDCS22,RSI,CURRBARSCOUNT=GDCS11,RSI,1) ,COLORYELLOW,LINETHICK1;
低点支撑2:DRAWLINE(CURRBARSCOUNT=DDCS22,RSI,CURRBARSCOUNT=DDCS11,RSI,1),COLORYELLOW,LINETHICK1;
高点压力3:DRAWLINE(CURRBARSCOUNT=GDCS22,RSI,CURRBARSCOUNT=GDCS2,RSI,1) ,COLORGREEN,LINETHICK1;
低点支撑3:DRAWLINE(CURRBARSCOUNT=DDCS22,RSI,CURRBARSCOUNT=DDCS2,RSI,1),COLORGREEN,LINETHICK1;
STICKLINE(XG1,GDCS13,GDCS13,0.5,1),COLORWHITE;
STICKLINE(XG2,GDCS23,GDCS23,0.5,1),COLORYELLOW;
STICKLINE(XD2,DDCS23,DDCS23,0.5,1),COLORMAGENTA;
STICKLINE(XD1,DDCS13,DDCS13,0.5,1),COLORCYAN;
神奇指标网(https://www.shenqizhibiao.com/)所有指标公式及文章来源于网络仅供学习研究
![神奇指标收藏](/storage/static/pc/images/collect.png)
![神奇指标点赞](/storage/static/pc/images/Heart.png)
网友评论
已有0人评论