自动预测通达信主图精准操作抄底逃顶
周期微调:=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;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;
未来函数检测结果如下:
该公式包含未来函数:BACKSET
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
周期微调赋值:5
高位A赋值:0
低位B赋值:0
次高3买赋值:0
后低3卖赋值:0
趋势线开关赋值:0
手动开关赋值:0
微调开关赋值:0
结构带开关赋值:1
顶底开关赋值:1
AR1赋值:C的有效数据周期数
AR2赋值:CONST(AR1)
AR3赋值:AR2-AR1
输出K线根数:AR3+1,NODRAW,COLORYELLOW
XA赋值:(3*收盘价+最低价+开盘价+最高价)/6
如果结构带开关=1返回XA否则返回DRAWNULL
输出B:(20*XA_1+19*1日前的XA_1+18*2日前的XA_1+17*3日前的XA_1+16*4日前的XA_1+15*5日前的XA_1+14*6日前的XA_1+13*7日前的XA_1+12*8日前的XA_1+11*9日前的XA_1+10*10日前的XA_1+9*11日前的XA_1+8*12日前的XA_1+7*13日前的XA_1+6*14日前的XA_1+5*15日前的XA_1+4*16日前的XA_1+3*17日前的XA_1+2*18日前的XA_1+20日前的XA_1)/210,画洋红色,LINETHICK3
输出D:B的15日简单移动平均,COLORFFFF00,LINETHICK3
DRAWBAND(B,RGB(190,94,245),D,RGB(69,201,11))
DRAWKLINE(最高价,开盘价,最低价,收盘价)
KDJA :=3*SMA((收盘价-9日内最低价最低值)/(9日内最高价最高值-9日内最低价最低值)*100,3,1)-2*SMA(SMA((收盘价-9日内最低价最低值)/(9日内最高价最高值-9日内最低价最低值)*100,3,1),3,1),NODRAW
STICKLINE(顶底开关>0 AND (KDJA >=90),收盘价,开盘价,3,0),COLORYELLOW
STICKLINE(顶底开关>0 AND (KDJA <=10),收盘价,开盘价,3,0),COLORBLUE
XD赋值:B>D
XY赋值:H>=B AND C>O AND L>D AND L<=B
当满足条件XD AND XY时,在开盘价和收盘价之间画柱状线
当满足条件XY AND XD时,在最低价和23之间画图标
A1赋值:(周期微调日前的最高价=HHV(最高价,(周期微调+1)))
B1:=A1的周期微调过滤
C1赋值:BACKSET(B1,(周期微调+1))
D1:=C1的周期微调过滤
A2赋值:(周期微调日前的最低价=LLV(最低价,(周期微调+1)))
B2:=A2的周期微调过滤
C2赋值:BACKSET(B2,(周期微调+1))
D2:=C2的周期微调过滤
E1赋值:(REF(周期微调日内最低价最低值,1)+REF(周期微调日内最高价最高值,1))/2
E2赋值:(最高价+最低价)/2
H1赋值:(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR 收盘价的有效数据周期数=1
H2赋值:D1 AND NOT(D2 AND E1>=E2)
L1赋值:D2 AND NOT(D1 AND E1=E2)
X1赋值:REF(上次H1距今天数,1)+1
如果L1返回最低价否则返回10000
G1赋值:F1>1日前的F1
I1赋值:BACKSET(G1,2)
LD赋值:I1>1日前的I1
L2赋值:LD OR ISLASTBAR OR 收盘价的有效数据周期数=1
X2赋值:REF(上次L2距今天数,1)+1
如果H2返回最高价否则返回0
G2赋值:F2>1日前的F2
I2赋值:BACKSET(G2,2)
HD赋值:I2>1日前的I2
A3赋值:H
B3:=REF(H,REF(上次HD距今天数,1)+1)>REF(H,REF(上次HD距今天数,1)+2+REF(上次HD距今天数,REF(上次HD距今天数,1)+2))
D3:=A3 AND B3 AND HD
E3赋值:BACKSET(D3,REF(上次HD距今天数,1)+2)
HH赋值:E3>1日前的E3
A4赋值:L>REF(L,REF(上次LD距今天数,1)+1)
B4:=REF(L,REF(上次LD距今天数,1)+1)
D4:=A4 AND B4 AND LD
E4赋值:BACKSET(D4,REF(上次LD距今天数,1)+2)
LL赋值:E4>1日前的E4
H3赋值:HH OR ISLASTBAR OR C的有效数据周期数=1
X3赋值:REF(上次H3距今天数,1)+1
F3赋值:BACKSET(H3 AND 统计X3日满足LL的天数>0,LLVBARS(IF(LL,L,POW(10,20)),X3))
G3赋值:F3>1日前的F3
I3赋值:BACKSET(G3,2)
LZ赋值:I3>1日前的I3
L4赋值:LZ OR ISLASTBAR OR C的有效数据周期数=1
X4赋值:REF(上次L4距今天数,1)+1
F4赋值:BACKSET(L4 AND 统计X4日满足HH的天数>0,HHVBARS(IF(HH,H,-POW(10,20)),X4))
G4赋值:F4>1日前的F4
I4赋值:BACKSET(G4,2)
HZ赋值:I4>1日前的I4
K1赋值:BACKSET(ISLASTBAR,MIN(上次HZ距今天数,BARSLAST(LZ))+1)
K2赋值:K1>1日前的K1
UU赋值:BACKSET(ISLASTBAR,上次LD距今天数+1)
VV赋值:UU>1日前的UU
WW赋值:BACKSET(VV,REF(上次LD距今天数,1)+2)
XX赋值:WW>1日前的WW
UU2:=BACKSET(ISLASTBAR,上次HD距今天数+1)
VV2:=UU2>1日前的UU2
WW2:=BACKSET(VV2,REF(上次HD距今天数,1)+2)
XX2赋值:WW2>1日前的WW2
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,DRAW520417741233573789BOVE
DRAWNUMBER(趋势线开关=1 AND LD,L,K),COLORFFFF00
高点赋值:上次HD距今天数
低点赋值:上次LD距今天数
J1赋值:BACKSET(ISLASTBAR,高点和低点的较小值+1)
J2赋值:J1>1日前的J1
高位价赋值:IF(微调开关=1,高点日前的H,1),DRAWNULL)COLORRED,NODRAW
低位价赋值:IF(微调开关=1,低点日前的L,1),DRAWNULL)画绿色,NODRAW
H11:=高位价,NODRAW
H12:=低位价,NODRAW
L22:=DRAWNULL,NODRAW
如果高点< 低点返回H11否则返回L22
如果最低价>低位价返回H11否则返回L22
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(高点+1日内H最高值,DATE)
VAR9赋值:REFDATE(低点+1日内L最低值,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))),画白色
DRAWTEXT(VV2,买C2,VARCAT('买C2=',VAR2STR(买C2,2))),画白色
DRAWTEXT(VV2,买C3,VARCAT('买C3=',VAR2STR(买C3,2))),画白色
DRAWTEXT(VV,L,VARCAT('(低位)',VAR2STR(L,2))),画绿色
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,高点日前的H,1),DRAWNULL)NODRAW
低位价2:=IF(微调开关=1,低点日前的L,1),DRAWNULL)NODRAW
H111:=高位价2,NODRAW
H121:=低位价2,NODRAW
L221:=DRAWNULL,NODRAW
H221:=高位价2,NODRAW
H231:=低位价2,NODRAW
如果高点>低点返回H121否则返回L221
如果最高价< 高位价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),画洋红色,DOTLINE
卖出输出C2:DRAWLINE(VV,CONST(卖C2),CURRBARSCOUNT=1,卖C2,1),画洋红色,DOTLINE
输出卖出C3:DRAWLINE(VV,CONST(卖C3),CURRBARSCOUNT=1,卖C3,1),画洋红色,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
STICKLINE(VV,L,CONST(VAR71),0,-1),画洋红色
IFC(CL1,DRAWLINE(VV2,H,VV,L,0),DRAWNULL),画洋红色,LINETHICK3
前高2赋值:上次XX2距今天数,NODRAW
低位2赋值:上次VV距今天数,NODRAW
次高2赋值:上次VV2距今天数,NODRAW
前低2赋值:上次XX距今天数,NODRAW
前高价赋值:IF(微调开关=1,前高2日前的H,1),DRAWNULL)COLORLIRED,NODRAW
低价赋值:IF(微调开关=1,低位2日前的L,1),DRAWNULL)画绿色,NODRAW
次高价赋值:IF(微调开关=1,次高2日前的H,1),DRAWNULL)COLORYELLOW,NODRAW
前低价赋值:IF(微调开关=1,前低2日前的L,1),DRAWNULL)COLORFFFF00,NODRAW
MH11:=前高价,NODRAW
MH21:=低价,NODRAW
MH31:=次高价,NODRAW
如果前高2>低位2返回MH11否则返回DRAWNULL
如果低位2>次高2返回MH21否则返回DRAWNULL
如果前高价>=次高价返回MH11否则返回DRAWNULL
如果次高价>低价返回MH31否则返回DRAWNULL
如果最低价<=MH21返回MH21否则返回DRAWNULL
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),画绿色,DOTLINE
买入D2:DRAWLINE(VV2, CONST(CB), CURRBARSCOUNT=1, CB,1),画绿色,DOTLINE
买入D3:DRAWLINE(VV2, CONST(CD), CURRBARSCOUNT=1, CD,1),画绿色,DOTLINE
DRAWTEXT(VV2,买D1,VARCAT('买D1=',VAR2STR(买D1,2))),画白色
DRAWTEXT(VV2,买D2,VARCAT('买D2=',VAR2STR(买D2,2))),画白色
DRAWTEXT(VV2,买D3,VARCAT('买D3=',VAR2STR(买D3,2))),画白色
DRAWTEXT(XX2,H,VARCAT('3点(前高)',VAR2STR(H,2))),COLORLIRED
STICKLINE(VV2,H,CONST(CD),0,-1),画绿色
IFC(CL4,DRAWLINE(XX2,H,VV,L,0),DRAWNULL)画绿色,LINETHICK3
IFC(CL4,DRAWLINE(VV,L,VV2,H,0),DRAWNULL)COLORFF8800,LINETHICK3
前低赋值:上次XX距今天数,NODRAW
高位赋值:上次VV2距今天数,NODRAW
次低赋值:上次VV距今天数,NODRAW
前低价4:=IF(微调开关=1,前低日前的L,1),DRAWNULL)画绿色,NODRAW
高位价4:=IF(微调开关=1,高位日前的H,1),DRAWNULL)COLORRED,NODRAW
次低价4:=IF(微调开关=1,次低日前的L,1),DRAWNULL)COLORFFFF00,NODRAW
HH11:=前低价4,NODRAW
HH21:=高位价4,NODRAW
H131:=次低价4,NODRAW
如果前低>高位返回HH11否则返回DRAWNULL
如果高位>次低返回HH21否则返回DRAWNULL
如果前低价4<=次低价4返回HH11否则返回DRAWNULL
如果高位价4>前低价4返回HH11否则返回DRAWNULL
如果最高价>=HH21返回HH21否则返回DRAWNULL
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))),画白色
DRAWTEXT(VV,卖出D2,VARCAT('卖D2=',VAR2STR(卖D2,2))),画白色
DRAWTEXT(VV,卖出D3,VARCAT('卖D3=',VAR2STR(卖D3,2))),画白色
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)画洋红色,LINETHICK3
当满足条件XX2时,在H和39之间画图标
当满足条件XX时,在L和38之间画图标
当满足条件VV时,在L和38之间画图标
当满足条件VV2时,在H和39之间画图标
GB2:=IF(手动开关=1,CONST(高位A-1日前的H),DRAWNULL),NODRAW
LB2:=IF(手动开关=1,CONST(低位B-1日前的L),DRAWNULL),NODRAW
HB1:=IF(手动开关=1,CONST(次高3买-1日前的H),DRAWNULL),NODRAW
如果次高3买=0返回HB1否则返回HB1
如果高位A>低位B返回GB2否则返回DRAWNULL
如果高位A>低位B返回LB2否则返回DRAWNULL
如果GB2>LB2 AND 次高3买=0返回GB2否则返回DRAWNULL
如果GB2>LB2 AND 次高3买=0返回LB2否则返回DRAWNULL
CB1:=VVB11 AND VVB22 AND VVB33 AND VVB44 ,NODRAW
如果HB1>LB2 AND GB2>HB1返回HB1否则返回DRAWNULL
GB3:=IFC(CB1,GB2,DRAWNULL)
LB3:=IFC(CB1,LB2,DRAWNULL)
V520417741233573789B1:=SQRT(GB3/LB3)
V520417741233573789B2:=SQRT(V520417741233573789B1)
FB赋值:LB3*SQRT(V520417741233573789B1),NODRAW
GB赋值:LB3*V520417741233573789B1,NODRAW
JB赋值:LB3*(V520417741233573789B1+V520417741233573789B2-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))),画绿色
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