NN:=BARSLAST(DATE!=REF(DATE,1))+1;
RHN:= REF(HHV(H,NN) ,0);
RLN:= REF(LLV(L,NN) ,0);
SJTJ:=DATE<1590301;
SJ:=SJTJ AND TIME<103000;
ZS:=IF(DATE<REF(DATE,1) OR DATE>REF(DATE,1),REF(C,1),REF(REF(C,1),BARSLAST(DATE<REF(DATE,1) OR DATE>REF(DATE,1))));
KP:=IF(DATE<REF(DATE,1) OR DATE>REF(DATE,1),O,REF(O,BARSLAST(DATE<REF(DATE,1) OR DATE>REF(DATE,1))));
开:IF(SJTJ AND TIME>090000, KP,DRAWNULL),LINETHICK0,COLORYELLOW;
高:IF(SJTJ,RHN,DRAWNULL),LINETHICK0,COLORMAGENTA;
低:IF(SJTJ,RLN,DRAWNULL),LINETHICK0,COLORYELLOW;
HH1:=IF(H <REF(H,4) AND REF(H,1)<REF(H,4) AND REF(H,2)<REF(H,4) AND REF(H,3)<REF(H,4),REF(H,4),0);
LL1:=IF(L >REF(L,4) AND REF(L,1)>REF(L,4) AND REF(L,2)>REF(L,4) AND REF(L,3)>REF(L,4),REF(L,4),0);
HH2:=IF(HH1>0,HH1,REF(HH1,BARSLAST(HH1>0)));
LL2:=IF(LL1>0,LL1,REF(LL1,BARSLAST(LL1>0)));
K1:=IF(C>HH2 ,-3,IF(C<LL2 ,1,0));
K2:=IF(K1<0 OR K1>0,K1,REF(K1,BARSLAST(K1<0 OR K1>0)));
GX:=IF(C>10000,0.001,0.0005);
HH22:=IF(C>20000,HH2+20,HH2*(1+GX));
LL22:=IF(C>20000,LL2-20,LL2*(1-GX));
G:=IF(K2=1,HH22,LL22);
支撑:IF(REF(K2,1)=-3 AND SJTJ,REF(G,1),DRAWNULL),LINETHICK2,COLORRED;
压力:IF(REF(K2,1)=1 AND SJTJ,REF(G,1),DRAWNULL),LINETHICK2,COLORGREEN;
W2:=(O-C);
HKX1:=W2>0 AND K2=-3 AND SJTJ;HKX2:=W2<=0 AND K2=-3 AND SJTJ;
LKX1:=W2>0 AND K2=1 AND SJTJ;LKX2:=W2<=0 AND K2=1 AND SJTJ;
STICKLINE(HKX1,O,C,2,0),COLORRED;
STICKLINE(HKX1,O,H,0.0,0),COLORRED;
STICKLINE(HKX1,C,L,0.0,0),COLORRED;
STICKLINE(HKX2,O,C,2,1),COLORRED;
STICKLINE(HKX2,O,L,0.0,0),COLORRED;
STICKLINE(HKX2,C,H,0.0,0),COLORRED;
STICKLINE(LKX1,O,C,2,0),COLORCYAN;
STICKLINE(LKX1,O,H,0.0,0),COLORCYAN;
STICKLINE(LKX1,C,L,0.0,0),COLORCYAN;
STICKLINE(LKX2,C,O,2,1),COLORCYAN;
STICKLINE(LKX2,C,H,0.0,0),COLORCYAN;
STICKLINE(LKX2,O,L,0.0,0),COLORCYAN;
GDK:=ABS(ZS-KP)/ZS>0.02;XB:=IF(C>13000,0.02,0.01);GDK2:=ABS(ZS-KP)/ZS>XB;
KPGZ:=KP*1.0005;KPDZ:=KP*0.9995;
HS11:= SJ AND C>KPGZ AND GDK2;
LS11:= SJ AND C<KPDZ AND GDK2;
HS22:= SJ AND C>=KPDZ AND REF(C,1)>=KPDZ AND GDK2;
LS22:= SJ AND C<=KPGZ AND REF(C,1)<=KPGZ AND GDK2;
HS:= HS11 OR HS22 ;
LS:= LS11 OR LS22;
{DK1:=BARSLAST(DK);KK1:=BARSLAST(KK);DK2:=BARSLAST(CROSS(KK1,DK1));KK2:=BARSLAST(CROSS(DK1,KK1));HS:=DK2<KK2;LS:=KK2<DK2;}
GDJ:=IF(LS,RHN,RLN);
最高价:IF(C<KP AND TIME>090500 AND TIME<093000 , RHN,DRAWNULL),LINETHICK2,COLORGREEN;
最低价:IF(C>KP AND TIME>090500 AND TIME<093000 , RLN,DRAWNULL),LINETHICK2,COLORRED;
DRAWNUMBER(ISLASTBAR AND TIME>090500 AND TIME<103000 AND GDK,GDJ,GDJ),COLORMAGENTA;
HKX3:=W2>0 AND HS AND SJ;HKX4:=W2<=0 AND HS AND SJ;
LKX3:=W2>0 AND LS AND SJ;LKX4:=W2<=0 AND LS AND SJ;
STICKLINE(HKX3,O,C,2,0),COLORRED;
STICKLINE(HKX3,O,H,0.0,0),COLORRED;
STICKLINE(HKX3,C,L,0.0,0),COLORRED;
STICKLINE(HKX4,O,C,2,1),COLORRED;
STICKLINE(HKX4,O,L,0.0,0),COLORRED;
STICKLINE(HKX4,C,H,0.0,0),COLORRED;STICKLINE(LKX3,O,C,2,0),COLORCYAN;
STICKLINE(LKX3,O,H,0.0,0),COLORCYAN;
STICKLINE(LKX3,C,L,0.0,0),COLORCYAN;
STICKLINE(LKX4,C,O,2,1),COLORCYAN;
STICKLINE(LKX4,C,H,0.0,0),COLORCYAN;
STICKLINE(LKX4,O,L,0.0,0),COLORCYAN;
|