DRAWTEXT_FIX(1,0.82,0.01,1,'说明: 双击鼠标出现十字浮标,移动浮标到选定蝴蝶形态的前高、前低、后高、后低的位置,在标题栏的“K线根数”处就可看到各点的K线根数值,然后按ALT+T键,弹出参数调整窗,将各个点的K线根数值填进相应的栏,填好后点关闭窗口即可。'),COLORYELLOW; DRAWTEXT_FIX(1,0.50,0.06,1,'选点的要求:回调形态符合A1>C1、B1>X1、C1>B1、0.382<XB1<0.786; 反弹形态符合X2>B2、C2>A2、B2>C2、0.382<XB2<0.786。'),COLORYELLOW; AR1:=BARSCOUNT(C); AR2:=CONST(AR1); AR3:=AR2-AR1; K线根数:AR3+1,NODRAW,COLORYELLOW; QL1:=REF(L,回调前低X-1); QG1:=REF(H,回调前高A-1); HL1:=REF(L,回调后低B-1); HG1:=REF(H,回调后高C-1); XB1:CONST((QG1-HL1)/(QG1-QL1)),COLORGREEN,NODRAW; VVH1:=IF(QG1>=HG1 AND HG1>HL1 AND HL1>QL1 AND XB1>0.382 AND XB1<=0.786,QL1,DRAWNULL),NODRAW; VVH2:=IF(QG1>=HG1 AND HG1>HL1 AND HL1>QL1 AND XB1>0.382 AND XB1<=0.786,QG1,DRAWNULL),NODRAW; VVH3:=IF(QG1>=HG1 AND HG1>HL1 AND HL1>QL1 AND XB1>0.382 AND XB1<=0.786,HL1,DRAWNULL),NODRAW; VVH4:=IF(QG1>=HG1 AND HG1>HL1 AND HL1>QL1 AND XB1>0.382 AND XB1<=0.786,HG1,DRAWNULL),NODRAW; CL1:=VVH1 AND VVH2 AND VVH3 AND VVH4,NODRAW; 买入成立:CL1,COLORLIRED,NODRAW; QG1A:=IFC(CL1,QG1,DRAWNULL); HG1A:=IFC(CL1,HG1,DRAWNULL); QL1A:=IFC(CL1,QL1,DRAWNULL); HL1A:=IFC(CL1,HL1,DRAWNULL); VARA:=(HG1A-HL1A),NODRAW; VAR1:=HG1A-(VARA*1.618),NODRAW; VAR2:=HG1A-(VARA*2.00),NODRAW; VAR3:=HG1A-(VARA*2.240),NODRAW; VAR4:=HG1A-(VARA*2.618),NODRAW; 买D1:DRAWLINE(CURRBARSCOUNT=(回调后高C), CONST(VAR1), CURRBARSCOUNT=1, VAR1,1),COLORFF8800,DOTLINE; 买D2:DRAWLINE(CURRBARSCOUNT=(回调后高C), CONST(VAR2), CURRBARSCOUNT=1, VAR2,1),COLORFF8800,DOTLINE; 买D3:DRAWLINE(CURRBARSCOUNT=(回调后高C), CONST(VAR3), CURRBARSCOUNT=1, VAR3,1),COLORFF8800,DOTLINE; 买D4:DRAWLINE(CURRBARSCOUNT=(回调后高C), CONST(VAR4), CURRBARSCOUNT=1, VAR4,1),COLORFF8800,DOTLINE; DRAWTEXT(CURRBARSCOUNT=回调后高C,买D1,VARCAT('买D1=',VAR2STR(买D1,3))),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=回调后高C,买D2,VARCAT('买D2=',VAR2STR(买D2,3))),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=回调后高C,买D3,VARCAT('买D3=',VAR2STR(买D3,3))),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=回调后高C,买D4,VARCAT('买D4=',VAR2STR(买D4,3))),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=回调前低X,L,VARCAT('前低X1【XB1】=',VAR2STR(CONST(XB1),3))),COLORGREEN; DRAWTEXT(CURRBARSCOUNT=回调前高A,H,VARCAT('前高【A1】',VAR2STR(H,2))),COLORRED; DRAWTEXT(CURRBARSCOUNT=回调后低B,L,VARCAT('后低【B1】',VAR2STR(L,2))),COLORFF8800; DRAWTEXT(CURRBARSCOUNT=回调后高C,H,VARCAT('后高【C1】',VAR2STR(H,2))),COLORMAGENTA; IFC(CL1,DRAWLINE(CURRBARSCOUNT=(回调前低X),L,CURRBARSCOUNT=(回调前高A),H,0),DRAWNULL)COLORYELLOW,LINETHICK2; IFC(CL1,DRAWLINE(CURRBARSCOUNT=(回调前高A),H,CURRBARSCOUNT=(回调后低B),L,0),DRAWNULL)COLORYELLOW,LINETHICK2; IFC(CL1,DRAWLINE(CURRBARSCOUNT=(回调后低B),L,CURRBARSCOUNT=(回调后高C),H,0),DRAWNULL)COLORYELLOW,LINETHICK2; IFC(CL1,DRAWLINE(CURRBARSCOUNT=(回调前低X),L,CURRBARSCOUNT=(回调后低B),L,0),DRAWNULL)COLORFF8800,DOTLINE; IFC(CL1,DRAWLINE(CURRBARSCOUNT=(回调后高C),H,CURRBARSCOUNT=(回调后高C-8),买D4,0),DRAWNULL)COLORFF8800,DOTLINE; DRAWLINE(CURRBARSCOUNT=(回调后低B),L,CURRBARSCOUNT=(回调后高C),(买D4),0),COLORFF8800,DOTLINE; STICKLINE(CURRBARSCOUNT=(回调后高C),H,CONST(VAR4),0,-1),COLORFF8800; DRAWICON(CURRBARSCOUNT=回调前高A,H,39); DRAWICON(CURRBARSCOUNT=回调前低X,L,38); DRAWICON(CURRBARSCOUNT=回调后高C,H,39); DRAWICON(CURRBARSCOUNT=回调后低B,L,38); QG2:=REF(H,反弹前高X-1); QL2:=REF(L,反弹前低A-1); HG2:=REF(H,反弹后高B-1); HL2:=REF(L,反弹后低C-1); XB2:(HG2-QL2)/(QG2-QL2),COLORYELLOW,NODRAW; VVH5:=IF(QG2>=HG2 AND HG2>HL2 AND HL2>QL2 AND XB2>0.382 AND XB2<=0.786,QG2,DRAWNULL),NODRAW; VVH6:=IF(QG2>=HG2 AND HG2>HL2 AND HL2>QL2 AND XB2>0.382 AND XB2<=0.786,QL2,DRAWNULL),NODRAW; VVH7:=IF(QG2>=HG2 AND HG2>HL2 AND HL2>QL2 AND XB2>0.382 AND XB2<=0.786,HG2,DRAWNULL),NODRAW; VVH8:=IF(QG2>=HG2 AND HG2>HL2 AND HL2>QL2 AND XB2>0.382 AND XB2<=0.786,HL2,DRAWNULL),NODRAW; CL2:=VVH5 AND VVH6 AND VVH7 AND VVH8,NODRAW; 卖出成立:CL2,COLORFFFF00,NODRAW; QG2A:=IFC(CL2,QG2,DRAWNULL); HG2A:=IFC(CL2,HG2,DRAWNULL); QL2A:=IFC(CL2,QL2,DRAWNULL); HL2A:=IFC(CL2,HL2,DRAWNULL); VARB:=(HG2A-HL2A),NODRAW; VAR5:=HL2A+(VARB*1.618),NODRAW; VAR6:=HL2A+(VARB*2.000),NODRAW; VAR7:=HL2A+(VARB*2.240),NODRAW; VAR8:=HL2A+(VARB*2.618),NODRAW; 卖D1:DRAWLINE(CURRBARSCOUNT=(反弹后低C), CONST(VAR5), CURRBARSCOUNT=1,CONST(VAR5),1),COLORMAGENTA,DOTLINE; 卖D2:DRAWLINE(CURRBARSCOUNT=(反弹后低C), CONST(VAR6), CURRBARSCOUNT=1,CONST(VAR6),1),COLORMAGENTA,DOTLINE; 卖D3:DRAWLINE(CURRBARSCOUNT=(反弹后低C), CONST(VAR7), CURRBARSCOUNT=1,CONST(VAR7),1),COLORMAGENTA,DOTLINE; 卖D4:DRAWLINE(CURRBARSCOUNT=(反弹后低C), CONST(VAR8), CURRBARSCOUNT=1,CONST(VAR8),1),COLORMAGENTA,DOTLINE; DRAWTEXT(CURRBARSCOUNT=反弹后低C,卖D1,VARCAT('卖D1=',VAR2STR(卖D1,3))),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=反弹后低C,卖D2,VARCAT('卖D2=',VAR2STR(卖D2,3))),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=反弹后低C,卖D3,VARCAT('卖D3=',VAR2STR(卖D3,3))),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=反弹后低C,卖D4,VARCAT('卖D4=',VAR2STR(卖D4,3))),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=反弹前高X,H,VARCAT('前高X2【XB2】=',VAR2STR(CONST(XB2),3))),COLORRED; DRAWTEXT(CURRBARSCOUNT=反弹前低A,L,VARCAT('前低【A2】',VAR2STR(L,2))),COLORGREEN; DRAWTEXT(CURRBARSCOUNT=反弹后高B,H,VARCAT('后高【B2】',VAR2STR(H,2))),COLORMAGENTA; DRAWTEXT(CURRBARSCOUNT=反弹后低C,L,VARCAT('后低【C2】',VAR2STR(L,2))),COLORFF8800; IFC(CL2,DRAWLINE(CURRBARSCOUNT=(反弹前高X),H,CURRBARSCOUNT=(反弹前低A),L,0),DRAWNULL)COLORLIRED,LINETHICK2; IFC(CL2,DRAWLINE(CURRBARSCOUNT=(反弹前低A),L,CURRBARSCOUNT=(反弹后高B),H,0),DRAWNULL)COLORLIRED,LINETHICK2; IFC(CL2,DRAWLINE(CURRBARSCOUNT=(反弹后高B),H,CURRBARSCOUNT=(反弹后低C),L,0),DRAWNULL)COLORLIRED,LINETHICK2; IFC(CL2,DRAWLINE(CURRBARSCOUNT=(反弹前高X),H,CURRBARSCOUNT=(反弹后高B),H,0),DRAWNULL)COLORMAGENTA,DOTLINE; IFC(CL2,DRAWLINE(CURRBARSCOUNT=(反弹后低C),L,CURRBARSCOUNT=(反弹后低C-8),卖D4,0),DRAWNULL)COLORMAGENTA,DOTLINE; DRAWLINE(CURRBARSCOUNT=(反弹后高B),H,CURRBARSCOUNT=(反弹后低C),(卖D4),0),COLORMAGENTA,DOTLINE; STICKLINE(CURRBARSCOUNT=(反弹后低C),L,CONST(VAR8),0,-1),COLORMAGENTA; DRAWICON(CURRBARSCOUNT=反弹前高X,H,39); DRAWICON(CURRBARSCOUNT=反弹前低A,L,38); DRAWICON(CURRBARSCOUNT=反弹后高B,H,39); DRAWICON(CURRBARSCOUNT=反弹后低C,L,38); A111:=REF(H,3)=HHV(H,2*6+1); B111:=FILTER(A111,3); C111:=BACKSET(B111,3+1); D111:=FILTER(C111,3+1); A112:=REF(L,3)=LLV(L,2*6+1); B112:=FILTER(A112,3+1); C112:=BACKSET(B112,3+1); D112:=FILTER(C112,3); E111:=(REF(LLV(L,2*3),1)+REF(HHV(H,2*3),1))/2; E112:=(H+L)/2; H111:=(D111 AND NOT(D112 AND E111>=E112)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1; L111:=(D112 AND NOT(D111 AND E111<E112)); H112:=D111 AND NOT(D112 AND E111>=E112); X111:=REF(BARSLAST(H111),1)+1; F111:=BACKSET(H111 AND COUNT(L111,X111)>0,LLVBARS(IF(L111,LOW,10000),X111)); G111:=F111>REF(F111,1); I111:=BACKSET(G111,2); LD:=I111>REF(I111,1); L112:=LD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1; X112:=REF(BARSLAST(L112),1)+1; F112:=BACKSET(L112 AND COUNT(H112,X112)>0,HHVBARS(IF(H112,HIGH,0),X112)); G112:=F112>REF(F112,1); I112:=BACKSET(G112,2); HD:=I112>REF(I112,1); {IF(趋势线开关=1,DRAWLINE(LD,L,HD,H,0),DRAWNULL)LINETHICK1,DOTLINE,COLOR0000FF;} IF(趋势线开关=1,DRAWLINE(LD,L,HD,H,0),DRAWNULL)LINETHICK1,DOTLINE,COLORBLUE; IF(趋势线开关=1,DRAWLINE(HD,H,LD,L,0),DRAWNULL)LINETHICK1,DOTLINE,COLOR00FF00; J111:=BACKSET(BARSTATUS=2 ,MIN(BARSLAST(HD),BARSLAST(LD))+1); J112:=J111>REF(J111,1); 预测走势:IF(趋势线开关=1,DRAWLINE(J112,IF(HD,H,L),BARSTATUS=2,IF(BARSLAST(HD)>BARSLAST(LD),H,L),0),DRAWNULL),COLORYELLOW,DOTLINE; K:=CURRBARSCOUNT,NODRAW; DRAWNUMBER(趋势线开关=1 AND HD,H,K),COLORLIRED,DRAWABOVE; DRAWNUMBER(趋势线开关=1 AND LD,L,K),COLORFFFF00;
标签:--,XB1,HL2,HL1,XB2,蝴蝶,通达信,HD,0.382 From: https://www.cnblogs.com/ip99/p/17453355.html