{参数M1=8,M2=20,M3=5}
KXDT:=IF(CURRBARSCOUNT=1 AND PERIOD=5 AND NOT(C>1500) AND C<O,REF(CLOSE,1)*0.9,DRAWNULL),NODRAW; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,KXDT,MIN(OPEN,CLOSE),-1,-1),COLORLIBLUE;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);QZXM_50:=REFDATE(REF(HHV(HIGH,M2),M3),DATE);QZXM_52:=REFDATE(REF(LLV(LOW,M2),M3),DATE);QZXM_54:=(QZXM_50+QZXM_52)/2;AA1:=REF(L,M1)=LLV(L,2*M1+1);QZXM_TODAY:=REFDATE(CLOSE,DATE),NODRAW;第一股票多空线:IF(QZXM_TODAY >= QZXM_50, QZXM_50, IF(QZXM_TODAY > QZXM_52 AND QZXM_TODAY < QZXM_50, QZXM_54, IF(QZXM_TODAY <= QZXM_52, QZXM_52, DRAWNULL))),COLORYELLOW,LINETHICK2;V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);V2:=(1-7/100)*(DMA(CLOSE,V1));N:=5;A111:=REF(H,N)=HHV(H,2*N+1);B1:=FILTER(A111,N);C1:=BACKSET(B1,N+1);D1:=FILTER(C1,N);A222:=REF(L,N)=LLV(L,2*N+1);B2:=FILTER(A222,N);C2:=BACKSET(B2,N+1);D2:=FILTER(C2,N);E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;E2:=(H+L)/2;H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1;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,L,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);U1:=T1>REF(T1,1);T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2>REF(T2,1);DRAWICON(U1,L*0.99,9);DRAWICON(U2,L*0.99,9);STICKLINE(V/REF(V,1)>1.9,OPEN,CLOSE,1,0),COLORYELLOW;STICKLINE(AA1,C,O,3,0),COLORMAGENTA,LINETHICK1;STICKLINE(AA1,H,L,0,0),COLORMAGENTA,LINETHICK1;
DUAN:DRAWLINE(U2,L,U1,L,1),COLORRED LINETHICK2;