通达信抓牛利器AD线主图源码

[复制链接]
查看57 | 回复0 | 2022-7-24 06:31:12 | 显示全部楼层 |阅读模式

MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
 A:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+
 16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+
 13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+
 10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+
 7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+
 4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210;

D:(15*MID+14*REF(MID,1)+13*REF(MID,2)+12*REF(MID,3)+11*REF(MID,4)+10*REF(MID,5)+
 9*REF(MID,6)+8*REF(MID,7)+7*REF(MID,8)+
 6*REF(MID,9)+5*REF(MID,10)+
 4*REF(MID,11)+3*REF(MID,12)+2*REF(MID,13)+
 REF(MID,15))/120;
 IF(D>A,D,A),COLORYELLOW;
 IF(D<A,A,D),COLORGREEN;
 E:REF(CLOSE,1);
 IF(E>A,E,A),COLORRED;
 STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;
 PHD:=IF(LLV(L,3)>=REF(H,3),REF(H,3),
 IF((LLV(L,3)>=REF(C,3) AND REF(C,3)>REF(O,3)),REF(C,3),
 IF(LLV(L,3)>=REF(O,3) AND REF(C,3)>REF(O,3),REF(O,3),REF(L,3))));
 {画量柱标识:}
 {1.画倍量黄金柱标识}
倍量黄金柱:=DRAWICON((LLV(L,3)>REF(L,3) OR LLV(L,3)=REF(L,3)) AND HHV(V,3)<REF(V,3) AND
 REF(C,3)>REF(O,3) AND REF(V,3)>=2*REF(V,4),H+0.2,17);
 {2.画梯量黄金柱标识}
梯量黄金柱:=DRAWICON(LLV(L,3)>REF(L,3) AND HHV(V,3)<REF(V,3) AND
 REF(V,5)>REF(V,6) AND REF(V,4)>REF(V,5) AND REF(V,3)>REF(V,4),H,17);
 {3.画平量黄金柱标识}
平量黄金柱:=DRAWICON(LLV(L,3)>REF(L,3) AND HHV(V,3)<REF(V,3) AND
 REF(C,3)>REF(O,3) AND ABS(REF(V,3)-REF(V,4))/REF(V,4)<=0.03,H,19);
倍量:=DRAWICON((VOL>REF(V,1)*2.0 OR VOL=REF(V,1)*2.0) AND C>REF(C,1),H+0.2,26);
 STICKLINE(倍量,OPEN,CLOSE,-1,0),COLORYELLOW;
倍量黄金线:STICKLINE(倍量黄金柱,PHD,PHD,28,0),COLORMAGENTA,LINETHICK5;
 DRAWICON(倍量黄金柱,PHD*1.008,12);
 DRAWTEXT(倍量黄金柱,PHD*1.008,'倍量黄金线'),COLORMAGENTA;
 HJZ:=(3*C+H+L+O)/6;
 HJZ2:=(8*HJZ+7*REF(HJZ,1)+6*REF(HJZ,2)+5*REF(HJZ,3)+4*REF(HJZ,4)+3*REF(HJZ,5)+2*REF(HJZ,6)+REF(HJZ,8))/36;
 HJZ3:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>HJZ2 AND C>O;
黄金柱:FILTER(HJZ3,5),STICK,COLORRED,LINETHICK4,NODRAW;
 STICKLINE(黄金柱,O,C,3.3,0),COLORRED;
 STICKLINE(黄金柱,H,L,0.1,0),COLORRED;
 DRAWTEXT(黄金柱,H*0.98,'←黄金柱'),COLORYELLOW;
 XG:=SUMBARS(FILTER(黄金柱,2),1);
 STICKLINE(XG,REF(C,XG-1),REF(C,XG-1),10,0),COLORGREEN;
 XG1:=SUMBARS(FILTER(黄金柱,2),1);
 STICKLINE(XG1,REF(L,XG1-1),REF(L,XG1-1),10,0),COLORAA00FF;
平量黄金线:STICKLINE(平量黄金柱,PHD*1.002,PHD,28,0),COLORYELLOW;
 DRAWTEXT(平量黄金柱,PHD*1.015,'←平量黄金线'),COLORFFCC00 ;
梯量黄金线:STICKLINE(梯量黄金柱,PHD*1.002,PHD,28,0),COLORYELLOW;
 DRAWTEXT(梯量黄金柱,PHD*1.015,'←梯量黄金线'),COLORCYAN ;
 STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;
高:=REF(HHV(H,1),3);
低:=REF(LLV(L,1),3);
 H19:=高-(高-低);
H38:=高-(高-低);
H中:=高-(高-低);
H61:=高-(高-低);
H80:=高-(高-低);
顶点:REFDATE(高,DATE),COLORWHITE;
低点:REFDATE(低,DATE),COLORWHITE;

真阴线:=C<=REF(C,1) AND C<=O;
假阳线:=C<=REF(C,1) AND C>=O;
阴线:=真阴线>0 OR 假阳线>0;
阴线天数:=BARSLAST(阴线);
阴线实体最高价:=MAX(REF(C,阴线天数),REF(O,阴线天数));
阴线成交量:=REF(V,阴线天数);
阳胜条件:=阴线天数>0 AND C>=阴线实体最高价 AND V>=阴线成交量;
阳胜:=IF(阳胜条件>0 AND REF(阳胜条件,1)=0,10,0);

真阳线:=C>=REF(C,1) AND C>=O;
假阴线:=C>=REF(C,1) AND C<=O;
阳线:=真阳线>0 OR 假阴线>0;
阳线天数:=BARSLAST(阳线);
阳线实体最低价:=MIN(REF(C,阳线天数),REF(O,阳线天数));
阳线成交量:=REF(V,阳线天数);
阴胜条件:=阳线天数>0 AND C<=阳线实体最低价 AND V>=阳线成交量*0.9;
阴胜:=IF(阴胜条件>0 AND REF(阴胜条件,1)=0,10,0),COLORWHITE;


阳胜进:=IF(阳胜>0,20,0),COLORRED;

阴胜出:=IF(阴胜>0,20,0);

DRAWTEXT(阳胜进>0,LOW*0.98,'阳'),COLOR00FFFF,LINETHICK3;
 DRAWTEXT(阴胜出>0,HIGH*1.02,'阴'),COLORGREEN,LINETHICK3;
 DRAWLINE(CURRBARSCOUNT=TOTALBARSCOUNT,CONST(C),CURRBARSCOUNT=1,C,3)DOTLINE;
 Q:=(O+C)/2;
 DRAWKLINE(Q,Q,Q,Q);

724411629.jpg

724411629.jpg

回复

使用道具 举报

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

本版积分规则