当前位置:首页 > 通达信公式 > 内容

通达信MACD顶底指标副图源码

作者:公式网   更新时间:2023-08-29   点击:
DIF:MACD.DIF,COLORLIGRAY;
DEA:MACD.DEA,COLORYELLOW;
强度:IF(DIF>DEA,DIF,DRAWNULL),COLORRED;
强度1:IF(DEA< DIF,DEA,DRAWNULL),COLORMAGENTA;
MACD:(DIF-DEA)*2,COLORSTICK;
MACD2:=MACD;
MJ:=MACD;
S05:=SUM(MJ,0);
QST:=BARSLAST(MJ< 0 AND REF(MJ,1)>0)+1;
QXT:=BARSLAST(MJ>0 AND REF(MJ,1)< 0)+1;
S5:=IF(MJ>0,S05-REF(S05,BARSLAST(MJ< 0)),S05-REF(S05,BARSLAST(MJ>0)))/10;
ST:=IF(MJ>0,REF(QST,QXT)+QXT,REF(QXT,QST)+QST);
RS5:=REF(S5,ST);
低位金叉:=CROSS(DIF,DEA) AND DIF< -0.1;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA< 0 AND COUNT(JCCOUNT=2,21)=1;
DRAWICON(二次金叉,0,25);
三次金叉:=CROSS(DIF,DEA) AND DEA< 0 AND COUNT(JCCOUNT=3,60)=1;
DRAWICON(三次金叉,0,26);
A002:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A002+1)>CLOSE AND DIF>REF(DIF,A002+1) AND CROSS(DIF,DEA);
DRAWICON(LONGCROSS(CLOSE,MA(CLOSE,5),17),MACD2,1);
DRAWTEXT(二次金叉>低位金叉,DIF,'金2'),COLORRED;
C81:=REF(C,1);
RN:=9;
RSI1:=SMA(MAX(C-C81,0),RN,1)/SMA(ABS(C-C81),RN,1)*100;
低点:=CROSS(RSI1,20);
STICKLINE(低点,0.1,0,0.3,0),COLORYELLOW;
DRAWICON(低点, 0.15,1);
DRAWTEXT(低点, 0.14,'←底'),COLORYELLOW;
顶:=CROSS(80,RSI1);
DRAWICON(顶, DIF*1.15,2);
DRAWTEXT(顶, DIF*1.1,'←减/清仓'),COLORGREEN;
死叉:=CROSS(DEA,DIF);
N1:=BARSLAST(死叉),NODRAW;
N2:=REF(BARSLAST(死叉),N1+1),NODRAW;
N3:=REF(BARSLAST(死叉),N2+N1+2),NODRAW;
CL1:=LLV(C,N1+1),NODRAW;
DIFL1:=LLV(DIF,N1+1),NODRAW;
CL2:=REF(CL1,N1+1),NODRAW;
DIFL2:=REF(DIFL1,N1+1),NODRAW;
CL3:=REF(CL2,N1+1),NODRAW;
DIFL3:=REF(DIFL2,N1+1),NODRAW;
PDIFL2:=IF(DIFL2>0,INTPART(LOG(DIFL2))-1,INTPART(LOG(-DIFL2))-1);
MDIFL2:=INTPART(DIFL2/POW(10,PDIFL2));
PDIFL3:=IF(DIFL3>0,INTPART(LOG(DIFL3))-1,INTPART(LOG(-DIFL3))-1);
MDIFL3:=INTPART(DIFL3/POW(10,PDIFL3));
MDIFB2:=INTPART(DIF/POW(10,PDIFL2));
MDIFB3:=INTPART(DIF/POW(10,PDIFL3));
直接底背离:=(CL1< CL2 );

通达信MACD顶底指标副图源码

通达信MACD顶底指标副图源码

资源下载

相关文章

热门推荐

移动端首页 | PC端

© by gszx.com.cn Mobile Web