通达信RMACD副图指标

源码

{R射→→MACD   N:1,100,2}
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(MACD50,50,MACD,0,1),COLORGREEN;
STICKLINE(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);   RA2:=REF(RSI,N)=LLV(RSI,N*2+1); 
RB1:=FILTER(RA1,N);               RB2:=FILTER(RA2,N);
RC1:=BACKSET(RB1,N+1);            RC2:=BACKSET(RB2,N+1);
RD1:=FILTER(RC1,N);    RD2:=FILTER(RC2,N);
GD1:=BARSLAST(RD1);      DD1:=BARSLAST(RD2);
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);      DDCS1:=CONST(DDT1);
GINGBUTS1:=REF(GDT1,GD1+1);   DINGBUTS1:=REF(DDT1,DD1+1);
GDCS2:=CONST(GINGBUTS1);   DDCS2:=CONST(DINGBUTS1);
GDCS13:=CONST(REF(RSI,GDCS1-1));  DDCS13:=CONST(REF(RSI,DDCS1-1));
GDCS23:=CONST(REF(RSI,GINGBUTS1-1));  DDCS23:=CONST(REF(RSI,DINGBUTS1-1));
XG1:=BACKSET(ISLASTBAR,GDCS1);  XD1:=BACKSET(ISLASTBAR,DDCS1);
XG2:=BACKSET(ISLASTBAR,GDCS2);  XD2:=BACKSET(ISLASTBAR,DDCS2);
M:=2*N;
RA11:=REF(RSI,M)=HHV(RSI,M*2+1);    RA22:=REF(RSI,M)=LLV(RSI,M*2+1); 
RB11:=FILTER(RA11,M);               RB22:=FILTER(RA22,M);
RC11:=BACKSET(RB11,M+1);            RC22:=BACKSET(RB22,M+1);
RD11:=FILTER(RC11,M);    RD22:=FILTER(RC22,M),NODRAW;
GD11:=BARSLAST(RD11);       DD11:=BARSLAST(RD22);
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);      DDCS11:=CONST(DDT11);  
GINGBUTS11:=REF(GDT11,GD11+1);   DINGBUTS11:=REF(DDT11,DD11+1);
GDCS22:=CONST(GINGBUTS11);   DDCS22:=CONST(DINGBUTS11);
高点压力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;
 

 




未来函数检测结果如下:
该公式包含未来函数:BACKSET
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图