通达信【全能主图】制胜法宝 自动预测+精准操作抄底逃顶 源码

周期微调:=5;高位A:=0;低位B:=0;次高3买:=0;后低3卖:=0;趋势线开关:=0;手动开关:=0;微调开关:=0;
结构带开关:=1;顶底开关:=1;
AR1:=BARSCOUNT(C);
AR2:=CONST(AR1);
AR3:=AR2-AR1;
K线根数:AR3+1,NODRAW,COLORYELLOW;
XA:=(3*CLOSE+LOW+OPEN+HIGH)/6;
XA_1:=IF(结构带开关=1,XA,DRAWNULL);
B:(20*XA_1+19*REF(XA_1,1)+18*REF(XA_1,2)+17*REF(XA_1,3)+16*REF(XA_1,4)+15*REF(XA_1,5)+14*REF(XA_1,6)+13*REF(XA_1,7)+12*REF(XA_1,8)+11*REF(XA_1,9)+10*REF(XA_1,10)+9*REF(XA_1,11)+8*REF(XA_1,12)+7*REF(XA_1,13)+6*REF(XA_1,14)+5*REF(XA_1,15)+4*REF(XA_1,16)+3*REF(XA_1,17)+2*REF(XA_1,18)+REF(XA_1,20))/210,COLORMAGENTA,LINETHICK3;
D:MA(B,15),COLORFFFF00,LINETHICK3;
DRAWBAND(B,RGB(190,94,245),D,RGB(69,201,11));
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
KDJA :=3*SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1)-2*SMA(SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1),3,1),NODRAW;
STICKLINE(顶底开关>0 AND (KDJA >=90),CLOSE,OPEN,3,0),COLORYELLOW;
STICKLINE(顶底开关>0 AND (KDJA <=10),CLOSE,OPEN,3,0),COLORBLUE;
XD:=B>D;
XY:=H>=B AND C>O AND L>D AND L<=B;
STICKLINE(XD AND XY,OPEN,CLOSE,3,0),COLORLIRED;
DRAWICON(XY AND XD,LOW,23);
A1:=(REF(HIGH,周期微调)=HHV(HIGH,(周期微调+1)));
B1:=FILTER(A1,周期微调);
C1:=BACKSET(B1,(周期微调+1));
D1:=FILTER(C1,周期微调);
A2:=(REF(LOW,周期微调)=LLV(LOW,(周期微调+1)));
B2:=FILTER(A2,周期微调);
C2:=BACKSET(B2,(周期微调+1));
D2:=FILTER(C2,周期微调);
E1:=(REF(LLV(LOW,周期微调),1)+REF(HHV(HIGH,周期微调),1))/2;
E2:=(HIGH+LOW)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
H2:=D1 AND NOT(D2 AND E1>=E2);
L1:=D2 AND NOT(D1 AND E1=E2);
X1:=REF(BARSLAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
A3:=H;
B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2));
D3:=A3 AND B3 AND HD;
E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2);
HH:=E3>REF(E3,1);
A4:=L>REF(L,REF(BARSLAST(LD),1)+1);
B4:=REF(L,REF(BARSLAST(LD),1)+1); D4:=A4 AND B4 AND LD;
E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2);
LL:=E4>REF(E4,1);
H3:=HH OR ISLASTBAR OR BARSCOUNT(C)=1;
X3:=REF(BARSLAST(H3),1)+1;
F3:=BACKSET(H3 AND COUNT(LL,X3)>0,LLVBARS(IF(LL,L,POW(10,20)),X3));
G3:=F3>REF(F3,1);
I3:=BACKSET(G3,2);
LZ:=I3>REF(I3,1);
L4:=LZ OR ISLASTBAR OR BARSCOUNT(C)=1;
X4:=REF(BARSLAST(L4),1)+1;
F4:=BACKSET(L4 AND COUNT(HH,X4)>0,HHVBARS(IF(HH,H,-POW(10,20)),X4));
G4:=F4>REF(F4,1);
I4:=BACKSET(G4,2);
HZ:=I4>REF(I4,1);
K1:=BACKSET(ISLASTBAR,MIN(BARSLAST(HZ),BARSLAST(LZ))+1);
K2:=K1>REF(K1,1);
UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
IF(趋势线开关=1,DRAWLINE(LD,L,HD,H,0),DRAWNULL)LINETHICK1,DOTLINE,COLOR0000FF;
IF(趋势线开关=1,DRAWLINE(HD,H,LD,L,0),DRAWNULL)LINETHICK1,DOTLINE,COLOR00FF00;
K:=CURRBARSCOUNT,NODRAW;
DRAWNUMBER(趋势线开关=1 AND HD,H,K),COLORLIRED,DRAWABOVE;
DRAWNUMBER(趋势线开关=1 AND LD,L,K),COLORFFFF00;

高点:=BARSLAST(HD);
低点:=BARSLAST(LD);
J1:=BACKSET(ISLASTBAR,MIN(高点,低点)+1);
J2:=J1>REF(J1,1);

{两点买入}
高位价:=IF(微调开关=1,REF(REF(H,高点),1),DRAWNULL)COLORRED,NODRAW;
低位价:=IF(微调开关=1,REF(REF(L,低点),1),DRAWNULL)COLORGREEN,NODRAW;
H11:=高位价,NODRAW;
H12:=低位价,NODRAW;
L22:=DRAWNULL,NODRAW;
VVC1:=IF(高点<低点,H11,L22),NODRAW;
VVC2:=IF(LOW>低位价,H11,L22),NODRAW;
CL3:=VVC1 AND VVC2,COLOR00FFFF,NODRAW;
两点买入成立:=CL3,NODRAW;

高位价1:=IFC(CL3,H11,L22);
低位价1:=IFC(CL3,H12,L22);
VAR1:=高位价1/低位价1;
VAR2:=SQRT(SQRT(VAR1));
VAR3:=SQRT(VAR1);
VAR4:=VAR3+VAR2-1;
VAR5:=高位价1/VAR2;
VAR6:=高位价1/VAR3;
VAR7:=高位价1/VAR4;
VAR8:=REFDATE(HHV(H,高点+1),DATE);
VAR9:=REFDATE(LLV(L,低点+1),DATE);
买C1:=CONST(VAR5),NODRAW;
买C2:=CONST(VAR6),NODRAW;
买C3:=CONST(VAR7),NODRAW;
买入C1:DRAWLINE(VV2,CONST(买C1),CURRBARSCOUNT=1,买C1,1),COLORFF8800,DOTLINE;
买入C2:DRAWLINE(VV2,CONST(买C2),CURRBARSCOUNT=1,买C2,1),COLORFF8800,DOTLINE;
买入C3:DRAWLINE(VV2,CONST(买C3),CURRBARSCOUNT=1,买C3,1),COLORFF8800,DOTLINE;
DRAWTEXT(VV2,买C1,VARCAT('买C1=',VAR2STR(买C1,2))),COLORWHITE;
DRAWTEXT(VV2,买C2,VARCAT('买C2=',VAR2STR(买C2,2))),COLORWHITE;
DRAWTEXT(VV2,买C3,VARCAT('买C3=',VAR2STR(买C3,2))),COLORWHITE;
DRAWTEXT(VV,L,VARCAT('(低位)',VAR2STR(L,2))),COLORGREEN;
DRAWTEXT(VV2,H,VARCAT('(高位)',VAR2STR(H,2))),COLORRED;
STICKLINE(VV2,H,CONST(VAR7),0,-1),COLORFF8800;
IFC(CL3,DRAWLINE(VV,L,VV2,H,0),DRAWNULL),COLORFF8800,LINETHICK3;

{两点卖出}
高位价2:=IF(微调开关=1,REF(REF(H,高点),1),DRAWNULL)NODRAW;
低位价2:=IF(微调开关=1,REF(REF(L,低点),1),DRAWNULL)NODRAW;
H111:=高位价2,NODRAW;
H121:=低位价2,NODRAW;
L221:=DRAWNULL,NODRAW;
H221:=高位价2,NODRAW;
H231:=低位价2,NODRAW;
VVA1:=IF(高点>低点,H121,L221)NODRAW;
VVA2:=IF(HIGH<高位价2,H111,L221);
CL1:=VVA1 AND VVA2 ,COLOR00FFFF,NODRAW;
两点卖出成立:=CL1,NODRAW,COLORYELLOW;

高位价3:=IFC(CL1,H111,L221);
低位价3:=IFC(CL1,H121,L221);
VAR11:=高位价3/低位价3;
VAR21:=SQRT(SQRT(VAR11));
VAR31:=SQRT(VAR11);
VAR41:=VAR31+VAR21-1;
VAR51:=低位价3*VAR21;
VAR61:=低位价3*VAR31;
VAR71:=低位价3*VAR41;

卖C1:=CONST(VAR51),NODRAW;
卖C2:=CONST(VAR61),NODRAW;
卖C3:=CONST(VAR71),NODRAW;
卖出C1:DRAWLINE(VV,CONST(卖C1),CURRBARSCOUNT=1,卖C1,1),COLORMAGENTA,DOTLINE;
卖出C2:DRAWLINE(VV,CONST(卖C2),CURRBARSCOUNT=1,卖C2,1),COLORMAGENTA,DOTLINE;
卖出C3:DRAWLINE(VV,CONST(卖C3),CURRBARSCOUNT=1,卖C3,1),COLORMAGENTA,DOTLINE;

DRAWTEXT(VV,卖C1,VARCAT('卖C1=',VAR2STR(卖C1,2))),COLORYELLOW;
DRAWTEXT(VV,卖C2,VARCAT('卖C2=',VAR2STR(卖C2,2))),COLORYELLOW;
DRAWTEXT(VV,卖C3,VARCAT('卖C3=',VAR2STR(卖C3,2))),COLORYELLOW;
{DRAWLINE(VV,L,CURRBARSCOUNT=1,CONST(VAR71),0),COLORMAGENTA,DOTLINE;}
STICKLINE(VV,L,CONST(VAR71),0,-1),COLORMAGENTA;
IFC(CL1,DRAWLINE(VV2,H,VV,L,0),DRAWNULL),COLORMAGENTA,LINETHICK3;

{三点买入}
前高2:=BARSLAST(XX2),NODRAW;
低位2:=BARSLAST(VV),NODRAW;
次高2:=BARSLAST(VV2),NODRAW;
前低2:=BARSLAST(XX),NODRAW;

前高价:=IF(微调开关=1,REF(REF(H,前高2),1),DRAWNULL)COLORLIRED,NODRAW;
低价:=IF(微调开关=1,REF(REF(L,低位2),1),DRAWNULL)COLORGREEN,NODRAW;
次高价:=IF(微调开关=1,REF(REF(H,次高2),1),DRAWNULL)COLORYELLOW,NODRAW;
前低价:=IF(微调开关=1,REF(REF(L,前低2),1),DRAWNULL)COLORFFFF00,NODRAW;

MH11:=前高价,NODRAW;
MH21:=低价,NODRAW;
MH31:=次高价,NODRAW;
VVM11:=IF(前高2>低位2,MH11,DRAWNULL)NODRAW;
VVM21:=IF(低位2>次高2,MH21,DRAWNULL)NODRAW;
VVM31:=IF(前高价>=次高价,MH11,DRAWNULL)NODRAW;
VVM41:=IF(次高价>低价,MH31,DRAWNULL)NODRAW;
VVM51:=IF(LOW<=MH21,MH21,DRAWNULL)NODRAW;
CL4:=VVM11 AND VVM21 AND VVM31 AND VVM41 AND VVM51,COLOR00FFFF,NODRAW;
三点买入成立:=CL4,COLORRED,NODRAW;

前高价6:=IFC(CL4,MH11,DRAWNULL);
低位价6:=IFC(CL4,MH21,DRAWNULL);
次高价6:=IFC(CL4,MH31,DRAWNULL);

VARJ1:=SQRT(前高价6/低位价6);
VARJ2:=SQRT(VARJ1);
CA:=低位价6/VARJ2;
CB:=低位价6/VARJ1;
CD:=低位价6/(VARJ1+VARJ2-1);
买D1:=CONST(CA),NODRAW;
买D2:=CONST(CB),NODRAW;
买D3:=CONST(CD),NODRAW;
买入D1:DRAWLINE(VV2, CONST(CA), CURRBARSCOUNT=1, CA,1),COLORGREEN,DOTLINE;
买入D2:DRAWLINE(VV2, CONST(CB), CURRBARSCOUNT=1, CB,1),COLORGREEN,DOTLINE;
买入D3:DRAWLINE(VV2, CONST(CD), CURRBARSCOUNT=1, CD,1),COLORGREEN,DOTLINE;

DRAWTEXT(VV2,买D1,VARCAT('买D1=',VAR2STR(买D1,2))),COLORWHITE;
DRAWTEXT(VV2,买D2,VARCAT('买D2=',VAR2STR(买D2,2))),COLORWHITE;
DRAWTEXT(VV2,买D3,VARCAT('买D3=',VAR2STR(买D3,2))),COLORWHITE;

DRAWTEXT(XX2,H,VARCAT('3点(前高)',VAR2STR(H,2))),COLORLIRED;
STICKLINE(VV2,H,CONST(CD),0,-1),COLORGREEN;
IFC(CL4,DRAWLINE(XX2,H,VV,L,0),DRAWNULL)COLORGREEN,LINETHICK3;
IFC(CL4,DRAWLINE(VV,L,VV2,H,0),DRAWNULL)COLORFF8800,LINETHICK3;

{三点卖出}
前低:=BARSLAST(XX),NODRAW;
高位:=BARSLAST(VV2),NODRAW;
次低:=BARSLAST(VV),NODRAW;

前低价4:=IF(微调开关=1,REF(REF(L,前低),1),DRAWNULL)COLORGREEN,NODRAW;
高位价4:=IF(微调开关=1,REF(REF(H,高位),1),DRAWNULL)COLORRED,NODRAW;
次低价4:=IF(微调开关=1,REF(REF(L,次低),1),DRAWNULL)COLORFFFF00,NODRAW;

HH11:=前低价4,NODRAW;
HH21:=高位价4,NODRAW;
H131:=次低价4,NODRAW;
VVA11:=IF(前低>高位,HH11,DRAWNULL)NODRAW;
VVA21:=IF(高位>次低,HH21,DRAWNULL)NODRAW;
VVA31:=IF(前低价4<=次低价4,HH11,DRAWNULL)NODRAW;
VVA41:=IF(高位价4>前低价4,HH11,DRAWNULL)NODRAW;
VVA51:=IF(HIGH>=HH21,HH21,DRAWNULL)NODRAW;
CL2:=VVA11 AND VVA21 AND VVA31 AND VVA41 AND VVA51,COLOR00FFFF,NODRAW;
三点卖出成立:=CL2,NODRAW;

前低价5:=IFC(CL2,HH11,DRAWNULL);
高位价5:=IFC(CL2,HH21,DRAWNULL);
次低价5:=IFC(CL2,H131,DRAWNULL);

VARV1:=SQRT(高位价5/前低价5);
VARV2:=SQRT(VARV1);
N1:=高位价5/VARV2;
N2:=高位价5/VARV1;
N3:=高位价5/(VARV2+VARV1-1);
CF:=2*高位价5-前低价5-(N2-N3),COLORRED,NODRAW;
CG:=高位价5+(高位价5-前低价5),COLORRED,NODRAW;
CJ:=2*高位价5-前低价5+(N1-N2),COLORRED,NODRAW;
卖D1:=CONST(CF),NODRAW;
卖D2:=CONST(CG),NODRAW;
卖D3:=CONST(CJ),NODRAW;
卖出D1:DRAWLINE(VV,CONST(CF),CURRBARSCOUNT=1,CF,1),COLORLIRED,DOTLINE;
卖出D2:DRAWLINE(VV,CONST(CG),CURRBARSCOUNT=1,CG,1),COLORLIRED,DOTLINE;
卖出D3:DRAWLINE(VV,CONST(CJ),CURRBARSCOUNT=1,CJ,1),COLORLIRED,DOTLINE;

DRAWTEXT(VV,卖出D1,VARCAT('卖D1=',VAR2STR(卖D1,2))),COLORWHITE;
DRAWTEXT(VV,卖出D2,VARCAT('卖D2=',VAR2STR(卖D2,2))),COLORWHITE;
DRAWTEXT(VV,卖出D3,VARCAT('卖D3=',VAR2STR(卖D3,2))),COLORWHITE;

DRAWTEXT(XX,L,VARCAT('3点(前低)',VAR2STR(L,2))),COLORFFFF00;
STICKLINE(VV,L,CONST(CJ),0,-1),COLORLIRED;
IFC(CL2,DRAWLINE(XX,L,VV2,H,0),DRAWNULL)COLORLIRED,LINETHICK3;
IFC(CL2,DRAWLINE(VV2,H,VV,L,0),DRAWNULL)COLORMAGENTA,LINETHICK3;

DRAWICON(XX2,H,39);
DRAWICON(XX,L,38);
DRAWICON(VV,L,38);
DRAWICON(VV2,H,39);

GB2:=IF(手动开关=1,CONST(REF(H,高位A-1)),DRAWNULL),NODRAW;
LB2:=IF(手动开关=1,CONST(REF(L,低位B-1)),DRAWNULL),NODRAW;
HB1:=IF(手动开关=1,CONST(REF(H,次高3买-1)),DRAWNULL),NODRAW;
CB1A:=IF(次高3买=0,HB1,HB1);
VVB11:=IF(高位A>低位B,GB2,DRAWNULL)NODRAW;
VVB22:=IF(高位A>低位B,LB2,DRAWNULL)NODRAW;
VVB33:=IF(GB2>LB2 AND 次高3买=0,GB2,DRAWNULL)NODRAW;
VVB44:=IF(GB2>LB2 AND 次高3买=0,LB2,DRAWNULL)NODRAW;

CB1:=VVB11 AND VVB22 AND VVB33 AND VVB44 ,NODRAW;
CB1B:=IF(HB1>LB2 AND GB2>HB1,HB1,DRAWNULL);
GB3:=IFC(CB1,GB2,DRAWNULL);
LB3:=IFC(CB1,LB2,DRAWNULL);
VAB1:=SQRT(GB3/LB3);
VAB2:=SQRT(VAB1);
FB:=LB3*SQRT(VAB1),NODRAW;
GB:=LB3*VAB1,NODRAW;
JB:=LB3*(VAB1+VAB2-1),NODRAW;
DRAWLINE(CURRBARSCOUNT=(低位B), CONST(FB), CURRBARSCOUNT=低位B-6, FB,0),COLORLIRED,DOTLINE;
DRAWLINE(CURRBARSCOUNT=(低位B), CONST(GB), CURRBARSCOUNT=低位B-7, GB,0),COLORLIRED,DOTLINE;
DRAWLINE(CURRBARSCOUNT=(低位B), CONST(JB), CURRBARSCOUNT=低位B-8, JB,0),COLORLIRED,DOTLINE;
DRAWTEXT(CURRBARSCOUNT=低位B,FB,VARCAT('卖C1=',VAR2STR(FB,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=低位B,GB,VARCAT('卖C2=',VAR2STR(GB,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=低位B,JB,VARCAT('卖C3=',VAR2STR(JB,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=高位A,H*1.015,VARCAT('高位【A】',VAR2STR(H,2))),COLORRED;
DRAWTEXT(CURRBARSCOUNT=低位B,L*0.98,VARCAT('低位【B】',VAR2STR(L,2))),COLORGREEN;
DRAWLINE(CURRBARSCOUNT=低位B,L,CURRBARSCOUNT=低位B-7,CONST(JB),0),COLORLIRED,DOTLINE;
IF(手动开关=1,DRAWLINE(CURRBARSCOUNT=高位A,H,CURRBARSCOUNT=低位B,L,0),DRAWNULL),COLORFF0080,LINETHICK3;
STICKLINE(CURRBARSCOUNT=低位B,L,CONST(JB),0,-1),COLORLIRED;
{三点买入}
GB4:=IFC(GB2>LB2 AND CB1B AND 次高3买>0 AND 高位A>低位B AND 低位B>次高3买,GB2,DRAWNULL)NODRAW;
LB4:=IFC(GB2>LB2 AND CB1B AND 次高3买>0 AND 高位A>低位B AND 低位B>次高3买,LB2,DRAWNULL)NODRAW;
VAB3:=SQRT(GB4/LB4);
VAB4:=SQRT(VAB3);
CAS:=LB4/VAB4;
CBS:=LB4/VAB3;
CDS:=LB4/(VAB3+VAB4-1);
买D1A:=CONST(CAS),NODRAW;
买D2A:=CONST(CBS),NODRAW;
买D3A:=CONST(CDS),NODRAW;
手买D1:DRAWLINE(CURRBARSCOUNT=次高3买, CONST(CAS), CURRBARSCOUNT=1,CONST(CAS),1),COLORGREEN,DOTLINE;
手买D2:DRAWLINE(CURRBARSCOUNT=次高3买, CONST(CBS), CURRBARSCOUNT=1,CONST(CBS),1),COLORGREEN,DOTLINE;
手买D3:DRAWLINE(CURRBARSCOUNT=次高3买, CONST(CDS), CURRBARSCOUNT=1,CONST(CDS),1),COLORGREEN,DOTLINE;

DRAWTEXT(CURRBARSCOUNT=次高3买,CAS,VARCAT('手买D1=',VAR2STR(CAS,2))),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=次高3买,CBS,VARCAT('手买D2=',VAR2STR(CBS,2))),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=次高3买,CDS,VARCAT('手买D3=',VAR2STR(CDS,2))),COLORWHITE;

DRAWTEXT(CURRBARSCOUNT=次高3买,H*1.015,VARCAT('次高【C】',VAR2STR(H,2))),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=次高3买,H,CURRBARSCOUNT=次高3买-7,CONST(CDS),0),COLORGREEN,DOTLINE;
STICKLINE(CURRBARSCOUNT=次高3买,H,CONST(CDS),0,-1),COLORGREEN;
IF(手动开关=1 AND CB1B AND 低位B<高位A,DRAWLINE(CURRBARSCOUNT=低位B,L,CURRBARSCOUNT=次高3买,H,0),DRAWNULL),COLORFF0080,LINETHICK3;
DRAWICON(CURRBARSCOUNT=高位A,H,39);
DRAWICON(CURRBARSCOUNT=低位B,L,38);

GC1:=IF(手动开关=1,CONST(REF(H,高位A-1)),DRAWNULL),NODRAW;
LC1:=IF(手动开关=1,CONST(REF(L,低位B-1)),DRAWNULL),NODRAW;
HC2:=IF(手动开关=1,CONST(REF(L,后低3卖-1)),DRAWNULL),NODRAW;
CA1B:=IF(HC2>LC1 AND GC1>HC2,HC2,DRAWNULL);
VVC5:=IF(高位A<低位B,GC1,DRAWNULL)NODRAW;
VVC6:=IF(高位A<低位B,LC1,DRAWNULL)NODRAW;
VVC7:=IF(GC1>LC1 AND 后低3卖=0,GC1,DRAWNULL)NODRAW;
VVC8:=IF(GC1>LC1 AND 后低3卖=0,LC1,DRAWNULL)NODRAW;
CC2:=VVC5 AND VVC6 AND VVC7 AND VVC8 ,NODRAW;
GC5:=IFC(CC2,GC1,DRAWNULL);
LC5:=IFC(CC2,LC1,DRAWNULL);
VAC7:=SQRT(GC5/LC5);
VAC8:=SQRT(VAC7);
DA:=GC5/SQRT(VAC7);
DB:=GC5/VAC7;
DD:=GC5/(VAC7+VAC8-1);
DRAWLINE(CURRBARSCOUNT=高位A,CONST(DA),CURRBARSCOUNT=高位A-6,DA,0),COLORGREEN,DOTLINE;
DRAWLINE(CURRBARSCOUNT=高位A,CONST(DB),CURRBARSCOUNT=高位A-7,DB,0),COLORGREEN,DOTLINE;
DRAWLINE(CURRBARSCOUNT=高位A,CONST(DD),CURRBARSCOUNT=高位A-8,DD,0),COLORGREEN,DOTLINE;
DRAWTEXT(CURRBARSCOUNT=高位A,DA,VARCAT('买C1=',VAR2STR(DA,2))),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=高位A,DB,VARCAT('买C2=',VAR2STR(DB,2))),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=高位A,DD,VARCAT('买C3=',VAR2STR(DD,2))),COLORWHITE;
DRAWLINE(CURRBARSCOUNT=高位A,H,CURRBARSCOUNT=高位A-7,CONST(DD),0),COLORGREEN,DOTLINE;
IF(手动开关=1,DRAWLINE(CURRBARSCOUNT=低位B,L,CURRBARSCOUNT=高位A,H,0),DRAWNULL),COLORLIRED,LINETHICK3;
STICKLINE(CURRBARSCOUNT=高位A,H,CONST(DD),0,-1),COLORGREEN;

{三点卖出}
GC6:=IFC(HC2>LC1 AND CA1B AND 后低3卖>0 AND 低位B>高位A AND 高位A>后低3卖,GC1,DRAWNULL);
LC6:=IFC(HC2>LC1 AND CA1B AND 后低3卖>0 AND 低位B>高位A AND 高位A>后低3卖,LC1,DRAWNULL);
VAC9:=SQRT(GC6/LC6);
VAC10:=SQRT(VAC9);
NC1:=GC6/VAC10;
NC2:=GC6/VAC9;
NC3:=GC6/(VAC9+VAC10-1);
NC4:=GC6/(VAC9+VAC10-0.98);
DF:=2*GC6-LC6-(NC2-NC3),COLORRED,NODRAW;
DG:=GC6+(GC6-LC6),COLORRED,NODRAW;
DJ:=2*GC6-LC6+(NC1-NC2),COLORRED,NODRAW;
卖D1A:=CONST(DF),NODRAW;
卖D2A:=CONST(DG),NODRAW;
卖D3A:=CONST(DJ),NODRAW;
手卖D1:DRAWLINE(CURRBARSCOUNT=后低3卖, CONST(DF), CURRBARSCOUNT=1,CONST(DF),1),COLORLIRED,DOTLINE;
手卖D2:DRAWLINE(CURRBARSCOUNT=后低3卖, CONST(DG), CURRBARSCOUNT=1,CONST(DG),1),COLORLIRED,DOTLINE;
手卖D3:DRAWLINE(CURRBARSCOUNT=后低3卖, CONST(DJ), CURRBARSCOUNT=1,CONST(DJ),1),COLORLIRED,DOTLINE;
DRAWTEXT(CURRBARSCOUNT=后低3卖,L*0.98,VARCAT('后低【C】',VAR2STR(L,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=后低3卖,DF,VARCAT('手卖D1=',VAR2STR(DF,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=后低3卖,DG,VARCAT('手卖D2=',VAR2STR(DG,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=后低3卖,DJ,VARCAT('手卖D3=',VAR2STR(DJ,2))),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=后低3卖,L,CURRBARSCOUNT=后低3卖-7,CONST(DJ),0),COLORLIRED,DOTLINE;
IF(手动开关=1 AND CA1B AND 高位A<低位B,DRAWLINE(CURRBARSCOUNT=高位A,H,CURRBARSCOUNT=后低3卖,L,0),DRAWNULL),COLORLIRED,LINETHICK3;
STICKLINE(CURRBARSCOUNT=后低3卖,L,CONST(DJ),0,-1),COLORLIRED;
DRAWICON(CURRBARSCOUNT=次高3买,H,39);
DRAWICON(CURRBARSCOUNT=后低3卖,L,38);
预测趋势:IF(趋势线开关=1,DRAWLINE(J2,IF(HD,H,L),ISLASTBAR,IF(高点>低点,H,L),0),DRAWNULL),DOTLINE,COLORFFFFFF;



未来函数检测结果如下:
该公式包含未来函数:BACKSET
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图