当前位置: 网站首页 > 股票软件公式 > 通达信公式 > 文章 当前位置: 通达信公式 > 文章

通达信源码精选:天下无敌主图和副图,牛市买点辅助,MACD控盘

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

1、天下无敌主图和副图

主图公式和副图公式,其实源码是一样的。
青梅稍稍改了一下副图,让显示不压缩,更好看。
 
{天下无敌主图}
DRAWGBK(C>O,RGB(60,0,0),RGB(0,0,0),1,2,1);
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED;
ZK1:(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),DOTLINE,COLORBLUE;
ZD1:XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,LINETHICK2,COLORRED;
ZD2:EMA(ZD1,25),LINETHICK2;
DRAWBAND(ZD1,RGB(55,0,0),ZD2,RGB(0,91,0));
DRAWKLINE(H,O,L,C);
STICKLINE(ZD1>LOW AND ZD1<HIGH,ZD1,MIN(MIN(OPEN,CLOSE),ZD1),2,0),COLORYELLOW;
STICKLINE(ZD1>MIN(C,O) AND ZD1<MAX(C,O),ZD1,MIN(OPEN,CLOSE),2,0),COLORYELLOW;
STICKLINE(ZD1>HIGH,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(ZD1>HIGH,HIGH,LOW,0,0),COLORYELLOW;
VAR23:=100*XMA(XMA((C-REF(C,1)),6),6)/XMA(XMA(ABS((C-REF(C,1))),6),6);
回调买:=LLV(VAR23,2)=LLV(VAR23,7) AND COUNT(VAR23<0,2) AND CROSS(VAR23,MA(VAR23,2));
WWW58188COM:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
XG:=ZD1>HIGH AND 回调买 AND L<=ZD1;
DRAWTEXT(XG,L,'▲买入'),COLORRED;
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
DDX:=((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,10000,10000),COLOR00AAAA,LINETHICK;
V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
V5:=SMA(V2*120/FROMOPEN*5,2,1);
V10:=SMA(V5,5,1);
V20:=SMA(V10,5,1);
DY:=CURRBARSCOUNT=1 AND C<REF(C,1);
DY2:=REF(V2,1)-DY;
XG2:=C>O AND DY2<0.02 AND MA(C,5)>MA(C,60) AND C/REF(C,1)>=1.02 AND H<ZK1;
{DRAWTEXT(XG2,L,'▲抓牛'),COLORYELLOW;}
DRAWTEXT(XG2 AND L<ZD1,L,'↖牛暴涨'),COLORRED;
超B:=L2_AMO(0,2)/10000.0;
大B:=L2_AMO(1,2)/10000.0;
中B:=L2_AMO(2,2)/10000.0;
小B:=L2_AMO(3,2)/10000.0;
超S:=-L2_AMO(0,3)/10000.0;
大S:=-L2_AMO(1,3)/10000.0;
中S:=-L2_AMO(2,3)/10000.0;
小S:=-L2_AMO(3,3)/10000.0;
TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0);
净流入:=(超B+大B+中B+小B)+(超S+大S+中S+小S);
大宗净流入:=(超B+大B)+(超S+大S);
超大单:=(超B)+(超S);
大单:=(大B)+(大S);
中单:=(中B)+(中S);
小单:=(小B)+(小S);
大宗进:=(超B)+(大B);
大宗出:=(超S)+(大S);
非大宗进:=(中B)+(小B);
非大宗出:=(中S)+(小S);
资金流向:=(超B+大B+中B+小B)+(超S+大S+中S+小S);
近5日流向:=SUM(资金流向,5);
近10日流向:=SUM(资金流向,10);
主力资金线:=(L2_AMO(0,0)+L2_AMO(1,0)-L2_AMO(0,1)-L2_AMO(1,1))/100.0,LINETHICK2;
主力买力度:=LARGEINTRDVOL*100/VOL;
主力卖力度:=LARGEOUTTRDVOL*100/VOL;
AAB:=CONST(MAX(ABS(超大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单))))),NODRAW;
DRAWRECTREL(5,CONST(830-(ABS(超大单)*500/AAB))/2,35,460,IF(CONST(超大单)>0,RGB(255,0,255),RGB(0,255,255)));
DRAWRECTREL(40,CONST(830-(ABS(大单)*500/AAB))/2,70,460,IF(CONST(大单)>0,RGB(255,0,255),RGB(0,255,255)));
DRAWRECTREL(75,CONST(830-(ABS(中单)*500/AAB))/2,105,460,IF(CONST(中单)>0,RGB(255,0,255),RGB(0,255,255)));
DRAWRECTREL(110,CONST(830-(ABS(小单)*500/AAB))/2,140,460,IF(CONST(小单)>0,RGB(255,0,255),RGB(0,255,255)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.007,0.46,0,'超 户    大 户   中 户    散 户'),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.007,0.4,0,INTPART(超大单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.042,0.4,0,INTPART(大单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.076,0.4,0,INTPART(中单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.112,0.4,0,INTPART(小单)),COLORWHITE;
TYX3:=MA(REF(HHV((C+L+O+H)/4,30),1),3);
筹码突破:=C>TYX3 AND(C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),COLORRED;
A111:=COST(85);
A222:=COST(15);
A333:=A111-A222;
A444:=(A111+A222)/2;
单峰密集:=A333/A444*100<30,LINETHICK0;
{A5:=A3/A4*100<30;}
B1:=HHV(HIGH,250);
B2:=LLV(LOW,250);
B3:=B1-B2;
B4:=(A444-B2);
低位:=A444<(B3*04+B2),LINETHICK0;
低位单峰密集:=单峰密集 AND 低位;
B5:=C/REF(C,1)>1.04; {AND V/REF(V,1)>2;{ AND H=C;}
主力持仓%:=EMA(100*(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30)),3);
主力持仓大于75%:=主力持仓%>=75 {AND 主力持仓%<=91} AND C>0 AND CLOSE>OPEN AND C=H;
敢死吗:=主力持仓大于75% AND 低位单峰密集 AND B4 AND WINNER(C)>=0.91 AND B5,COLORGREEN,LINETHICK3;
{DRAWTEXT(FILTER(敢死吗=1,5),L,'----敢死吗'),COLORGREEN;}
DRAWICON(FILTER(敢死吗=1,5),L*0.995,25);
DIF1:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA1:=EMA(DIF1,9);
AAA1:=(DIF1-DEA1)*2*60;
AAA上:=IF(AAA1>REF(AAA1,1),AAA1,DRAWNULL);
AAA下:=IF(AAA1<REF(AAA1,1),AAA1,DRAWNULL);
买:=13;
入:=AAA1-REF(AAA1,1);
正大:=CROSS(入,买);
DIF2:=EMA(DCLOSE,10)-EMA(DCLOSE,72);
DEA2:=EMA(DIF2,17);
AAA:=(DIF2-DEA2)*2*60;
入2:=AAA-REF(AAA,1);
牛股:=CROSS(入2,13);
正大牛股:=正大 AND 牛股;
DRAWICON(正大牛股,L*0.99,1);
VAR1:=(CLOSE-MA(CLOSE,7))/MA(CLOSE,7)*100;
VAR2:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
VAR3:=SMA(VAR2,3,1);
天:=100+(-ABS(VAR1)),COLORRED;
下:=SMA(VAR3,2,1);
无:=ABS(VAR1),COLORGREEN;
敌:=50,COLORFFAA00,LINETHICK3;
DRAWTEXT(CROSS(无,10) AND C>O,L,'<---天下无敌'),COLORGREEN;
LC:=REF(CLOSE,1);
操作线:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100;
卖:=CROSS(90,操作线);
DRAWICON(卖,H*1.01,8);
绝底线:=5;
买阴线1:操作线<5 AND ZD1>ZD2 AND L<ZD1,NODRAW;
DRAWICON(买阴线1,L*0.98,7);
买阴线2:操作线<5 AND ZD1<ZD2 AND L<ZD1,NODRAW;
DRAWICON(买阴线2,L*0.995,7);
{股民学院 www.58188.com 整理}



2、牛市买点辅助

这个牛市买点辅助,融合了立柱量,支撑压力划线,三天法则还有板块所属等等,对辅助分析非常实用。

 {牛市买点辅助指标源码}

F1:=ZIG(3,10);
T1:=F1>REF(F1,1) AND REF(F1,1)<=REF(F1,2);
T2:=F1<REF(F1,1) AND REF(F1,1)>=REF(F1,2);
STICKLINE(T1,O,C,3,0),COLORMAGENTA;
STICKLINE(T2,O,C,3,0),COLORGREEN;{主图转折K}
DRAWTEXT_FIX(1,0.00,0,0,'所属行业:'),COLORFF60FF;
DRAWTEXT_FIX(1,0.06,0,0,HYBLOCK),COLORFF60FF;
DRAWTEXT_FIX(1,0.15,0,0,'所属地区:'),COLOR6F59FF;
DRAWTEXT_FIX(1,0.22,0,0,DYBLOCK),COLOR6F59FF;
DRAWTEXT_FIX(1,0.00,0.05,0,'所属概念:'),COLORWHITE;
DRAWTEXT_FIX(1,0.06,0.05,0,GNBLOCK),COLORWHITE;
 
ZG20:=HHV(HIGH,20);
调:(1-(C/REF(ZG20,1)))*100,COLORGREEN,NODRAW;
 
D1:=YEAR AND MONTH AND DAY;
HH1:=STRCAT(CON2STR(YEAR,0),'年');
HH2:=STRCAT(CON2STR(MONTH,0),'月');
HH3:=STRCAT(CON2STR(DAY,0),'日');
HH4:=STRCAT('【',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日'))))))); 
HH:=STRCAT(STRCAT(STRCAT(HH1,HH2),STRCAT(HH3,HH4)),'】');
DRAWTEXT_FIX(D1,0,1,0,HH),COLORGREEN;
 
GG:=CROSS(MA(C,5),MA(C,20)) AND  CROSS(MA(C,5),MA(C,30)) AND CROSS(MA(C,5),MA(C,60));
BB:=MA(C,60)>MA(C,10) AND CROSS(MA(C,10),MA(C,30)) AND MA(C,30)>MA(C,20) AND ABS(MA(C,60)-MA(C,20))/MA(C,20)<0.05;
JJ:=MA(C,30)>MA(C,5) AND CROSS(MA(C,5),MA(C,20)) AND MA(C,20)>MA(C,10);
DD:=ABS((MA(C,5)-MA(C,10))+(MA(C,10)-MA(C,20))+(MA(C,20)-MA(C,30)))<0.02 AND MA(C,5)>REF(MA(C,5),1) AND MA(C,10)>REF(MA(C,10),1);
EE:=MA(C,20)>MA(C,5) AND CROSS(MA(C,5),MA(C,10)) AND MA(C,10)>MA(C,60) AND ABS(MA(C,20)-MA(C,60))/MA(C,60)<0.05;
FF:=GG OR BB OR JJ OR DD OR EE ;
DRAWTEXT_FIX(1,0.48,0,0,'~☆~~☆~'),COLORYELLOW;
C2:=REF(C,1);
涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORRED;
STICKLINE(涨停,H,L,0,0),COLORRED;
跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;
STICKLINE(跌停,H,L,0,1),COLORGREEN;
圣:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;
灵:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
石:=SMA(灵,13,8);
仙:=CEILING(SMA(石,13,8));
编著:=SMA(圣,21,8);
AABB:=IF(L,CONST(L),DRAWNULL);
启动:STICKLINE(仙-编著>75,AABB,AABB*0.99,15,1),COLOR0000FF;
{VARZT:=BARSLAST(平台启动);}
{DRAWTEXT(VARZT=1,0.99*(AABB+AABB*0.98)/2,'平台启动'),COLORYELLOW;}
AAA:=(3*C+H+L+O)/6;
VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;
VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;
VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;
VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;
VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
DRAWBAND(VAR1,RGB(155,50,50),VAR6,RGB(250,250,0));
短线:VAR1,COLORWHITE;
中线:VAR6,COLORYELLOW;
下跌:IF(VAR1=VAR6,VAR6,DRAWNULL),COLORGREEN;
TJ1:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VAR1;
立桩量:=FILTER(TJ1,5);
TJ2:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)));
突破:=TJ2=1;
STICKLINE(CLOSE,REF(HIGH,BARSLAST(立桩量)),REF(HIGH,BARSLAST(立桩量)),1,0),COLORCYAN;
STICKLINE(CLOSE,REF(LOW,BARSLAST(立桩量)),REF(LOW,BARSLAST(立桩量)),1,0),COLORYELLOW;
TJ3:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(LOW,3),1,0)));
三天法则:=TJ3=1;
成立:=三天法则 AND 突破;
条件成立:=FILTER(成立,3);
DRAWTEXT(条件成立,L*0.99,'成立'),COLORYELLOW;
STICKLINE(C>=O,C,O,3,0),COLOR000045;
STICKLINE(C>=O,C,O,2.5,0),COLOR000065;
STICKLINE(C>=O,C,O,2,0),COLOR000085;
STICKLINE(C>=O,C,O,1.5,0),COLOR0000A5;
STICKLINE(C>=O,C,O,1,0),COLOR0000C5;
STICKLINE(C>=O,C,O,0.5,0),COLOR0000E5;
STICKLINE(C>=O,H,L,0,0),COLOR0000F5;
STICKLINE(C<O,C,O,3,0),COLOR353500;
STICKLINE(C<O,C,O,2.5,0),COLOR454500;
STICKLINE(C<O,C,O,2,0),COLOR555500;
STICKLINE(C<O,C,O,1.5,0),COLOR656500;
STICKLINE(C<O,C,O,1,0),COLOR757500;
STICKLINE(C<O,C,O,0.5,0),COLOR858500;
STICKLINE(C<O,H,L,0,0),COLOR959500;
HIGHN:=10;
LOWN:=10;
HIGHDISPLAY:=0;
LOWDISPLAY:=0;
ZGDISPLAY:=0;
MADISPLAY:=0;
AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);
QY:=BACKSET(AA,HIGHN+1);
CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);
DRAWICON(CC,H*1.02,2);
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DINGBU1:=REF(DINGBU,DDD+1);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
MM:=IF(CURRBARSCOUNT>GDCS2,0,1);
上轨:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORBLUE,LINETHICK1;
DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055FF,POINTDOT;
DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,POINTDOT;
AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);
QY1:=BACKSET(AA1,LOWN+1);
CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);
DRAWICON(CC1,L*0.98,1);
DD1:=BARSLAST(CC1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
YDB:=IF(DD1,REF(L,DD1),L);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
ZDB:=REF(YDB,DD1+1);
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
下轨:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED,LINETHICK1;
ZGSTAR:=(上轨+下轨)/2;
ZGEND:=CONST((上轨+下轨)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORFF55BB,LINETHICK1;
DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORMAGENTA,POINTDOT;
DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLORCYAN,POINTDOT;
VAR7:=0;
VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
B:IF(买1>0 OR 买2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;
DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'买'),COLORRED;
S:IF(卖1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;
DRAWTEXT(卖1>0,HIGH*1.02,'卖'),COLORGREEN;
DRAWICON((ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)),LOW*0.98,1) ;
DRAWICON((ZIG(3,5)<REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)>=REF(ZIG(3,5),3)),HIGH*1.01,2);
ZB:=EMA(EMA(VAR3,5),5)*3, COLORSTICK;
VARA:=IF(VAR9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
K:=EMA(VAR7,5)*2, , COLORFF00FF;
D:=EMA(K,5), , COLORWHITE;
J:=K*3-D*2, ,COLORYELLOW;
VARB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5)) AND J>10;
HS:=VOL/CAPITAL*100, , COLORGREEN;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,LOW*0.95,'机构进场'),LINETHICK1,COLORFF00FF;
VAR1A:=IF(VARE>0,VARE,0);
VAR1B:=IF(VAR14>=200 AND VAR13>=150,15,IF(VAR14<=-200 AND VAR13<=-150,-15,VAR16))+60;
VAR1C:=VAR1A>48 AND VAR1B>60 AND VAR19<100;
DRAWTEXT(VAR1C AND COUNT(VAR1C,30)=1,LOW*0.95,'大顶(底)') COLORWHITE;
指标王:=CROSS(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,3,1),SMA(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,3,1),3,1)) AND SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,3,1)<20;
{指标王主力建仓:出现的主力建仓时,放心的买入,安心等待上涨。只求失败,指标王!}
DRAWTEXT(指标王,L,'主力建仓'),COLORYELLOW;
DRAWTEXT(VAR1,L*0.98,'★短买'),COLORYELLOW;
DRAWTEXT(CROSS(MA(C,3),MA(C,9)) AND C>=REF(C,1) AND C>O,L*0.98,'★加仓'),COLORMAGENTA;
下降压力线:DRAWLINE(HIGH>=HHV(HIGH,10),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),1),LINETHICK2;
STICKLINE(CURRBARSCOUNT=2,L,L,10,0),COLORGREEN,;
DRAWNUMBER(ISLASTBAR,REF(L,1),REF(L,1));
{股民学院 www.58188.com 整理}




3、MACD控盘

 VAR1:=EMA(EMA(CLOSE,13),13);

控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
STICKLINE(控盘<0,控盘,0,1,1),COLOR00FF00;
STICKLINE(控盘>REF(控盘,1) AND 控盘<0,控盘,0,1,1),COLORFF00FF;
无庄控盘:=控盘<0;
STICKLINE(控盘>REF(控盘,1) AND 控盘>0,控盘,0,1,1),COLOR0000FF;
有庄控盘:=控盘>REF(控盘,1) AND 控盘>0;
VAR2:=100*WINNER(CLOSE*0.95);
STICKLINE(控盘<REF(控盘,1) AND 控盘>0,控盘,0,1,1),COLORFFFF00;
主力出货:=控盘<REF(控盘,1) AND 控盘>0;
STICKLINE(VAR2>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0,1,1),COLOR00FFFF;
高度控盘: VAR2>50 AND COST(85)<CLOSE AND 控盘>0,COLOR00FFFF,LINETHICK2;
A10:=CROSS(控盘,0);
控盘B:=FILTER(IF(A10,1,0),5);
{分时价格原码}
JJ:=DYNAINFO(11);
{波段买卖原码}
P:=55;S:=8;M1:=3;
财:=(EMA(CLOSE,S)-EMA(CLOSE,P))*10,COLORRED,LINETHICK2;
神:=EMA(财,M1),COLORGREEN,LINETHICK1;
DRAWBAND(财,RGB(255,0,0),神,RGB(0,100,50));
{股价与均线偏离买卖条件}
BTJ1:=(C-JJ)/JJ<-0.005;
BTJ11:=(C-JJ)/JJ<-0.03;
BTJ12:=LAST(JJ>=REF(JJ,1),5,1) AND (C-JJ)/JJ<0.005;
STJ1:=(C-JJ)/JJ>0.005;
{控盘买卖条件}
STJ01:=控盘<REF(控盘,1)  AND 控盘>0.5;
STJ02:=控盘>0;
 
BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;
BTJ22:=控盘>REF(控盘,1) AND 控盘<0 ;
{波段买卖条件}
BTJ3:=CROSS(财,神) AND  财<-0.3;
BTJ32:=CROSS(财,神) AND  财<-0.1;
STJ31:=CROSS(神,财);
STJ32:=CROSS(神,财) AND  财>1.618;
{以下为信号};
BTJ81:=FILTER(BTJ1 AND BTJ2 AND BTJ3,13);
BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);
BTJ82:=FILTER(BTJ12 AND BTJ22 AND BTJ32,13);
DRAWICON(BTJ82,神,23);{追买};
DRAWICON(BTJ81 AND TIME>10,神,27);{买底};
DRAWICON(BTJ811 AND TIME>10,神,26);{必买};
DRAWTEXT(BTJ81,神,'买底'),COLORFF00FF;
DRAWTEXT(BTJ811,神*1.2,'必买'),COLOR0000FF;
STJ81:=FILTER(STJ1 AND STJ01 AND STJ31,13);
DRAWICON(STJ81,神,19);
STJ82:=FILTER(STJ02 AND STJ32 ,13);
DRAWICON(STJ82,神,15);
STJ83:=STJ81 AND STJ82;
DRAWTEXT(STJ83,神,'必卖'),COLOR00FF00;
{股民学院 www.58188.com 整理}


上一篇:通达信源码精选:金钻突破,平台整理突破,无忧主图

下一篇:通达信源码精选:顶底一目主图,散仙辅助,底部金叉选股