以下是通达信波段顶乾坤源码附图(无源码的请下载附件导入)
{波段顶乾坤}
X:=REF(CLOSE,1)<REF(CLOSE,2) AND REF(VOL,1)>MAX(REF(MA(VOL,5),1),MAX(REF(MA(VOL,10),1),REF(MA(VOL,20),1))) AND REF(VOL,1)>REF(MA(VOL,20),1)*1.1;
Y:=IF(X,MIN(REF(LOW,1),LOW),0);
Z1:=REF(Y,BARSLAST(X));
X1:=REF(CLOSE,1)<REF(OPEN,1) AND REF(VOL,1)>MAX(REF(MA(VOL,5),1),MAX(REF(MA(VOL,10),1),REF(MA(VOL,20),1))) AND REF(AMOUNT,1)=REF(HHV(AMOUNT,20),1) OR REF(CLOSE,1)<REF(OPEN,1) AND REF(AMOUNT,1)=REF(HHV(AMOUNT,20),1);
Y1:=IF(X1,REF(CLOSE,1),0);
Z2:=REF(Y1,BARSLAST(X1));
RSV1:=(CLOSE-LLV(LOW,38))/(HHV(HIGH,38)-LLV(LOW,38))*100;
KK:=SMA(RSV1,5,1);
中多:SMA(KK,10,1),COLOR669933;
STICKLINE(KK<=中多 ,KK,中多,3,0),COLOR669933;
VARE:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
RSV3:=SMA(SMA(VARE,3,1),3,1);
RSV4:=3*SMA(VARE,3,1)-2*RSV3;
短多:EMA(RSV4,5),COLORRED;
DRAWICON(CROSS(短多,中多),短多,1);
DRAWICON(CROSS(中多,短多),中多,2);
STICKLINE(SMA(VARE,3,1)>RSV3 ,SMA(VARE,3,1),RSV3,3,0), COLORRED;
STICKLINE(SMA(VARE,3,1)>RSV3 AND CLOSE>Z1 AND CLOSE>Z2 ,SMA(VARE,3,1),RSV3,3,0), COLORCYAN;
STICKLINE(SMA(VARE,3,1)>RSV3 ,SMA(VARE,3,1),RSV3,3,0), COLORYELLOW;
VAR1:=100*(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21));
RSV7:=SMA(VAR1,3,1);
STICKLINE(FILTER( RSV7<8, 50) ,0,20,4,0), COLORRED;
STICKLINE(FILTER( RSV7<8,50) ,0,8,15,0), COLORYELLOW;
STICKLINE(FILTER( RSV7>92, 50),92,100,15,0), COLOR66CC33;
STICKLINE(FILTER( RSV7>92, 50),80,92,4,0), COLORRED;
VAR2Q:=(MA(CLOSE,80)-MA(CLOSE,13)/3);
RSV8:= MA((CLOSE-VAR2Q)/VAR2Q,1);
XA:=EMA(RSV8,12)*0.7;
XB:=EMA(RSV8,3);
IF(LLV(XB-XA,12)>0,0,5),COLORGREEN,LINETHICK2;
{103,COLORGREEN,LINETHICK2;
0,COLORCYAN,LINETHICK2;}
DIFF :=( EMA(CLOSE,20) - EMA(CLOSE,90))*100;
DEA :=EMA(DIFF,45);
MACD :=2*(DIFF-DEA);
STICKLINE(DIFF<=0 AND DEA<=DIFF AND REF(DIFF,1)<REF(DEA,1) ,0,3,40,0),COLOR66CC33;
STICKLINE(DIFF<=0 AND DEA<=DIFF AND REF(DIFF,1)<REF(DEA,1) ,3,6,30,0),COLOR00FFFF;
STICKLINE(DIFF<=0 AND DEA<=DIFF AND REF(DIFF,1)<REF(DEA,1),6,20,0,0),COLORRED;
STICKLINE(DIFF>=0 AND DEA>=DIFF AND REF(DIFF,1)>REF(DEA,1),97,100,40,0),COLORFF00FF;
STICKLINE(DIFF>=0 AND DEA>=DIFF AND REF(DIFF,1)>REF(DEA,1),94,97,30,0),COLOR00FFFF;
STICKLINE(DIFF>=0 AND DEA>=DIFF AND REF(DIFF,1)>REF(DEA,1),80,94,1,0),COLORFF0000;
{突破线:50,COLORWHITE,LINETHICK2;};
VL:=REF(LOW,1);
VAR112:=(SMA(ABS(LOW-VL),13,1))/(SMA(MAX(LOW-VL,0),13,1))*100;
VAR114:=MA(VAR112,13);
VAR115:=LLV(LOW,34);
VAR118:=EMA(IF(LOW<=VAR115,VAR114,0),3);
VAR110:=SMA(SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1),5,1);
VAR111:=SMA((CLOSE-LLV(LOW,54))/(HHV(HIGH,54)-LLV(LOW,54))*100,7,1)*16.18-VAR110*10.9;
T:=FILTER(IF(VAR111<=VAR110 AND VAR118>REF(VAR118,1),VAR118*8,0),20);
DRAWTEXT(T,60,'★洗盘结束'),COLORFF00FF;
VAR21:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;
VAR22:=SMA(VAR21,3,1);
VAR23:=SMA(VAR22,3,1);
VAR24:=SMA(VAR23,3,1);
VAR25:=CROSS(VAR23,VAR24) AND VAR23<20;
DRAWTEXT(FILTER(VAR25,10)=1,20,'♂抄底'),COLORRED;
MA1:=MA(C,5);
MA2:=MA(C,10);
JG:=CROSS(MA1,MA2);
VOLUME:=VOL,VOLSTICK;
MAVOL1:=MA(VOLUME,5);
MAVOL2:=MA(VOLUME,10);
NL:=CROSS(MAVOL1,MAVOL2);
DIF1:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA1:=EMA(DIF1,9);
{MACD1:=(DIF1-DEA1)*2,COLORSTICK;}
NA:=CROSS(DIF1,DEA1);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,9,1);
D:=SMA(K,9,1);
J:=3*K-2*D;
KD:=CROSS(K,D) AND CROSS(J,D);
一招定乾坤:DRAWTEXT((JG AND NL AND NA) OR (JG AND NL AND KD) OR
(JG AND NA AND KD) OR (NL AND NA AND KD),50,'▲一招定乾坤'),COLORRED;
空:=EMA(C,5);
均衡:=EMA(空,5);
中轨:=HHV(MA(H,13),13);
VAR5:=FILTER(均衡>REF(均衡,1)AND 中轨<REF(中轨,1)AND C>REF(C,1),11);
DRAWTEXT(VAR5,30,'▲追涨'),COLORRED;
VARC:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100;
DRAWTEXT(CROSS(84,VARC),110,'●逃'),COLORYELLOW ;
AAA:=CONST(HHV(H,90));
VARE1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VAR12:=(HIGH+LOW+CLOSE)/3;
VAR13:=(VAR12-MA(VAR12,14))/(0.015*AVEDEV(VAR12,14));
VAR14:=(VAR12-MA(VAR12,70))/(0.015*AVEDEV(VAR12,70));
VAR15:=IF(VAR13>=150 AND VAR13<200 AND VAR14>=150 AND VAR14<200,10,0);
VAR16:=IF(VAR13<=-150 AND VAR13>-200 AND VAR14<=-150 AND VAR14>-200,-10,VAR15);
VAR17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VAR18:=100-ABS(VAR17);
VAR19:=IF(VAR18<90,VAR18,100);
VAR1A:=IF(VARE1>0,VARE1,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,60,'⊙大笔出货'),LINETHICK1,COLORFFCC66;
AA1:=AMOUNT/V;
BB1:=L<AA1*0.9;
CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD1:=L<MA(C,5)*0.921;
EE1:=V<MA(V,5)*1.5;
老鼠仓:=BB1 AND CC1 AND DD1 AND EE1,LINETHICK0;
DRAWTEXT(老鼠仓,80,'⊙老鼠仓'),COLOR40CCFF;
VAR2S:=(2*CLOSE+HIGH+LOW)/4;
VAR3S:=IF(YEAR>=2099 AND MONTH>2,0,1);
VAR4S:=LLV(LOW,5);
VAR5S:=HHV(HIGH,4);
散户:=EMA((VAR2S-VAR4S)/(VAR5S-VAR4S)*100,4)*VAR3S;
庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3S;
DRAWTEXT(CROSS(散户,庄家) AND 散户<30,30,'←吸'),COLORRED;
{BBB1:=MA(C,1);
B2:=SMA(SMA(SMA(BBB1,2,1),2,1),2,1),COLORRED;
SMA2:=MA(B2,2);
VARB1:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
买:DRAWTEXT(CROSS(VARB1,VAR3) AND B2>SMA2,20,'⊙买'),COLORRED;}
AA2:=IF(LLV(LOW,3)=LLV(LOW,13) AND CLOSE<REF((HIGH+LOW)/2,1),MAX(REF(LLV(LOW,12),BARSLAST(AA1)+1)-LOW,0),0);
AA3:=EMA(AA2,3)*3;
AA4:=SUMBARS(AA3>0,21);
AA5:=SUM(AA3,AA4)/21;
AA6:=REF(AA3,1)=HHV(AA3,3) AND REF(AA3,1)>AA5*3 AND COUNT(CLOSE/REF(CLOSE,1)<0.9025,8)=0 AND LLV(LOW,3)/HHV(HIGH,18)<0.88;
反转:=FILTER(AA6 AND AA5 AND AA4 AND AA3,3),COLORBLACK;
STICKLINE(CLOSE,0,AA3,3,1),COLORYELLOW;
STICKLINE(反转,0,15,3,0),COLORRED;
逃顶:CROSS(82,RSI);
STICKLINE( 逃顶,逃顶,20,5,0),COLORFF5500;
STICKLINE( 逃顶,逃顶,30,3,0),COLORFF8800;
STICKLINE( 逃顶,逃顶,30,2,0),COLORFFAA00;
STICKLINE( 逃顶,逃顶,30,1,0),COLORFFCC00;
VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;
DRAWICON(CROSS(82,VARR1),10,15);
DRAWTEXT(CROSS(82,VARR1),35,'逃'),COLORYELLOW;
MA5:=EMA(C,5);
MA13:=EMA(C,13);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),0),COLOR0000FF;
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),0),COLOR00FF00;
ST:=REF(UP,1)>REF(UP,2) AND DOWN<REF(UP,1);
STICKLINE(ST,100,95,5,0),COLOR008800;
STICKLINE(ST,100,95,2,0),COLOR00AA00;
STICKLINE(ST,100,95,1,0),COLOR00CC00;
STICKLINE(ST,100,95,0.2,0),COLOR00FF00;
DRAWTEXT(ST,95,'卖'),COLOR00FF00;
DIFF2:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA2:=EMA(DIFF2,9),COLORFFFF00;
A112:=BARSLAST(REF(CROSS(DIFF2,DEA2),1));
底背离:=REF(CLOSE,A112+1)>CLOSE AND DIFF2>REF(DIFF2,A112+1) AND CROSS(DIFF2,DEA2);
DRAWTEXT(底背离,10,'●底背离'),COLORLIMAGENTA;
A22:=BARSLAST(REF(CROSS(DEA2,DIFF2),1));
顶背离:=REF(CLOSE,A22+1)<CLOSE AND REF(DIFF2,A22+1)>DIFF2 AND CROSS(DEA2,DIFF2);
DRAWTEXT(顶背离,100,'●顶背离'),COLORLIGREEN;
{XL1:=((LLV(LOW,3) = LLV(LOW,60)) AND ((CLOSE / REF(CLOSE,1)) >= 1.04));
XL2:=(((CLOSE - EMA(CLOSE,21)) / EMA(CLOSE,21)) * 100);
XL3:=CROSS(XL2,(0 - 20));
DRAWTEXT(FILTER(((XL1 > 0) AND LOW),5),10,'●买点');
DRAWTEXT((XL3 > 0),10,'●绝对底部');
X6:=REF(CLOSE,1);
X7:=((SMA(MAX((CLOSE - X6),0),7,1) / SMA(ABS((CLOSE - X6)),7,1)) * 100);
X8:=CROSS(79,X7);
X9:=FILTER(X8,4);
DRAWTEXT(X9,95,'●出货'),COLOR9000F5;};
832522167.png
|