ZT:=C/ref(C,1)>1.097;
XH:=FILTER(ZT,13);
BH:=BARSLAST(ZT);
CZ:=REF(H,BH)-REF(L,BH);
STICKLINE(C,(REF(L,BH)+CZ*0.5),(REF(L,BH)+CZ*0.5),7,0),COLORRED;
STICKLINE(C,REF(L,BH),REF(L,BH),7,0),COLORBLUE;
STICKLINE(ZT,REF(O,BH),REF(C,BH),7,0),COLORYELLOW;
DRAWTEXT(ZT,L*0.98,'涨停'),COLORf00ff0;
varZT:=BARSLAST(C/REF(C,1)>1.097);
stickline(varZT=2,l*0.97,l*0.98,8,0),color0000ff;
drawtext(varZT=2,l*0.95,'3天'),coloryellow;
stickline(varZT=4,h*1.03,h*1.02,8,0),color9966ff;
drawtext(varZT=4,h*1.06,'5天'),coloryellow;
stickline(varZT=7,l*0.97,l*0.98,8,0),color00ffff;
drawtext(varZT=7,l*0.95,'8天'),coloryellow;
stickline(varZT=12,h*1.03,h*1.02,8,0),colorff33ff;
drawtext(varZT=12,h*1.06,'13天'),coloryellow;
stickline(varZT=20,l*0.97,l*0.98,8,0),color0066ff;
drawtext(varZT=20,l*0.95,'21天'),coloryellow;
stickline(varZT=33,h*1.03,h*1.02,8,0),color9932CD;
drawtext(varZT=33,h*1.06,'34天'),coloryellow;
stickline(varZT=54,l*0.97,l*0.98,8,0),color006600;
drawtext(varZT=54,l*0.95,'55天'),coloryellow;
stickline(varZT=88,h*1.03,h*1.02,8,0),color00ff00;
drawtext(varZT=88,h*1.06,'89天'),coloryellow;
stickline(varZT=143,l*0.97,l*0.98,8,0),colorccffff;
drawtext(varZT=143,l*0.95,'144天'),coloryellow;
stickline(varZT=232 ,h*1.03,h*1.02,8,0),colorff0033;
drawtext(varZT=232,h*1.06,'233天'),coloryellow;
stickline(varZT=376,l*0.97,l*0.98,8,0),colorff9966;
drawtext(varZT=376,l*0.95,'377天'),coloryellow;
{涨停时间(窗),副图:}
N:=3;
WR大于80考虑买:100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N)),linethick0;
均价:amount/(vol*100),linethick0,coloryellow;
ZT:=C/ref(C,1)>1.097;
XH:=FILTER(ZT,13);
BH:=BARSLAST(ZT);
STICKLINE(ZT,0,L*0.7,4,0),COLORYELLOW;
DRAWTEXT(ZT,L*0.8,'涨停'),COLORf00ff0;;
varZT:=BARSLAST(C/REF(C,1)>1.097);
AA:=BETWEEN(C,REF(L,BH)*1.01,REF(L,BH)*0.987);
stickline(AA,0,L*0.3,2,0),colorblue;
drawtext(AA,L*0.4,'警戒'),colorwhite;
stickline(AA and varzt=2,0,L*0.5,2,0),colorred;
drawtext(AA and varzt=2,L*0.5,'时间窗'),colorwhite;
stickline(AA and varzt=4,0,L*0.5,2,0),colorred;
drawtext(AA and varzt=4,L*0.5,'时间窗'),colorwhite;
stickline(AA and varzt=7,0,L*0.5,2,0),colorred;
drawtext(AA and varzt=7,L*0.5,'时间窗'),colorwhite;
stickline(AA and varzt=12,0,L*0.5,2,0),colorred;
drawtext(AA and varzt=12,L*0.5,'时间窗'),colorwhite;
stickline(AA and varzt=20,0,L*0.5,2,0),colorred;
drawtext(AA and varzt=20,L*0.5,'时间窗'),colorwhite;
{涨停时间窗选股公式}
ZT:=C/ref(C,1)>1.097;
XH:=FILTER(ZT,13);
BH:=BARSLAST(ZT);
H1:=BH=1;
H2:=BH=2;
H4:=BH=4;
H7:=BH=7;
H12:=BH=12;
C1:=ALL(C>REF(L,BH),1);
C2:=ALL(C>REF(L,BH),2);
C4:=ALL(C>REF(L,BH),4);
C7:=ALL(C>REF(L,BH),7);
C12:=ALL(C>REF(L,BH),12);
AA:=BETWEEN(C,REF(L,BH)*1.01,REF(L,BH)*0.987);
TJ1:=AA AND H1 AND C1;
TJ2:=AA AND H2 AND C2;
TJ4:=AA AND H4 AND C4;
TJ7:=AA AND H7 AND C7;
TJ12:=AA AND H12 AND C12;
XG:TJ1 OR TJ2 OR TJ4 OR TJ7 OR TJ12; |