通达信顾比均线主图指标源码

[复制链接]
查看180 | 回复0 | 2021-8-19 11:43:00 | 显示全部楼层 |阅读模式

以下是通达信顾比均线主图指标源码(无源码的请下载附件导入)

DA:EMA(CLOSE,3),COLORBLUE;
 DB:EMA(CLOSE,5) ,COLORBLUE;
 DC:EMA(CLOSE,8) ,COLORBLUE;
 DD:EMA(CLOSE,10) ,COLORBLUE;
 DE:EMA(CLOSE,12) ,COLORBLUE;
 DF:EMA(CLOSE,15) ,COLORBLUE;
 CA:EMA(CLOSE,30) ,COLORYELLOW;
 CB:EMA(CLOSE,35) ,COLORYELLOW;
 CC:EMA(CLOSE,40) ,COLORYELLOW;
 CD:EMA(CLOSE,45) ,COLORYELLOW;
 CE:EMA(CLOSE,50) ,COLORYELLOW;
 CF:EMA(CLOSE,60) ,COLORYELLOW;
 CDYX:=CA>CB AND CB>CC AND CC>CD AND CD>CE AND CE>CF;
 CKYX:=CA<CB AND CB<CC AND CC<CD AND CD<CE AND CE<CF;
 DDYX:=DA>DB AND DB>DC AND DC>DD AND DD>DE AND DE>DF;
 DKYX:=CA<CB AND DB<DC AND DC<DD AND DD<DE AND DE<DF;
 IF(CDYX,CA,DRAWNULL),COLORBROWN;
 IF(CDYX,CB,DRAWNULL),COLORBROWN;
 IF(CDYX,CC,DRAWNULL),COLORBROWN;
 IF(CDYX,CD,DRAWNULL),COLORBROWN;
 IF(CDYX,CE,DRAWNULL),COLORBROWN;
 IF(CDYX,CF,DRAWNULL),COLORBROWN;
 IF(CKYX,CA,DRAWNULL),COLORCYAN;
 IF(CKYX,CB,DRAWNULL),COLORCYAN;
 IF(CKYX,CC,DRAWNULL),COLORCYAN;
 IF(CKYX,CD,DRAWNULL),COLORCYAN;
 IF(CKYX,CE,DRAWNULL),COLORCYAN;
 IF(CKYX,CF,DRAWNULL),COLORCYAN;

IF(DDYX,DA,DRAWNULL),COLORRED;
 IF(DDYX,DB,DRAWNULL),COLORRED;
 IF(DDYX,DC,DRAWNULL),COLORRED;
 IF(DDYX,DD,DRAWNULL),COLORRED;
 IF(DDYX,DE,DRAWNULL),COLORRED;
 IF(DDYX,DF,DRAWNULL),COLORRED;

IF(DKYX,DA,DRAWNULL),COLORGREEN;
 IF(DKYX,DB,DRAWNULL),COLORGREEN;
 IF(DKYX,DC,DRAWNULL),COLORGREEN;
 IF(DKYX,DD,DRAWNULL),COLORGREEN;
 IF(DKYX,DE,DRAWNULL),COLORGREEN;
 IF(DKYX,DF,DRAWNULL),COLORGREEN;

A23:=((C + L) + H) / 3;
 A24:=EMA(A23,6);
 A25:=EMA(A24,5);
 A26:=CROSS(A24,A25);
 DRAWICON(A26,(LOW / 1.015),1),LINETHICK2,COLORMAGENTA;

A1:=DATE <= 13181231;
工作线:(EMA(C,14)) * A1,POINTDOT,LINETHICK4,COLORYELLOW;

P:=21;
 WH1:=IF(L=LLV(L,P),L,DRAWNULL);
 WH2:=CONST(BARSLAST(WH1!=DRAWNULL));
 WH3:=CONST(IF(WH2=0,H,REF(H,WH2)));
 WH4:=CONST(REF(BARSLAST(H>WH3),WH2+1)+WH2+1);
 WH5:=CONST(IF(WH4=0,H,REF(H,WH4)));
 WH6:=CONST(REF(BARSLAST(H>WH5),WH4+1)+WH4+1);
进场:IF(CURRBARSCOUNT<=WH2+21,CONST(IF(WH6=0,H,REF(H,WH6))),DRAWNULL),COLORRED;
 IF(CURRBARSCOUNT<=WH2+1,IF(L=LLV(L,P),L,DRAWNULL),DRAWNULL),CIRCLEDOT,COLORRED;
 DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),进场,'进场线'),COLORRED;
超跌进场:IF(CURRBARSCOUNT<=WH2+21,CONST(IF(WH4=0,H,REF(H,WH4))),DRAWNULL),COLORCB21BE;
 DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),超跌进场,'超跌进场线'),COLORCB21BE;
 H1:=IF(H=HHV(H,P),H,DRAWNULL);
 H2:=CONST(BARSLAST(H1!=DRAWNULL));
 H3:=CONST(IF(H2=0,L,REF(L,H2)));
 H4:=CONST(REF(BARSLAST(L<H3),H2+1)+H2+1);
 H5:=CONST(IF(H4=0,L,REF(L,H4)));
 H6:=CONST(REF(BARSLAST(L<H5),H4+1)+H4+1);
止损:IF(CURRBARSCOUNT<=H2+21,CONST(IF(H6=0,L,REF(L,H6))),DRAWNULL),COLORYELLOW;
 IF(CURRBARSCOUNT<=H2+1,IF(H=HHV(H,P),H,DRAWNULL),DRAWNULL),CIRCLEDOT,COLORBLUE;
 DRAWTEXT(CURRBARSCOUNT=INTPART((H2+21)*0.618),止损,'止损线'),COLORYELLOW;
止盈:IF(CURRBARSCOUNT<=H2+21,CONST(IF(H4=0,L,REF(L,H4))),DRAWNULL),COLORCB21BE;
 DRAWTEXT(CURRBARSCOUNT=INTPART((H2+21)*0.618),止盈,'止盈线'),COLORCB21BE;

6944481.png

6944481.png

回复

使用道具 举报

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

本版积分规则