{涨跌停虚拟}
{
ZTDT:=IF(NAMELIKE('ST') OR NAMELIKE('*ST') OR NAMELIKE('S'),0.05,0.1);
XLZ:=IF(CURRBARSCOUNT=1 AND C>=REF(C,1),ZTPRICE(REF(CLOSE,1),ZTDT),DRAWNULL);
XLD:=IF(CURRBARSCOUNT=1 AND C<REF(C,1),DTPRICE(REF(CLOSE,1),ZTDT),DRAWNULL);
STICKLINE(CURRBARSCOUNT=1 && (SETCODE=0 || SETCODE=1),XLZ,REF(C,1),-1,-1),COLORMAGENTA;
STICKLINE(CURRBARSCOUNT=1 && (SETCODE=0 || SETCODE=1),XLD,REF(C,1),-1,-1),COLORLIGRAY;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
}
{涨跌停标识}
涨跌:=REF(C,1);
涨停:=IF((C-涨跌)*100/涨跌>=(10-0.01*100/涨跌),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORRED;
跌停:=IF((涨跌-C)*100/涨跌>=(10-0.01*100/涨跌),1,0);
STICKLINE(跌停,OPEN,CLOSE,2,0),COLOR808000;
{21位画线}
FLAG:=ABS(C-O)/IF((H-L) = 0,100,H-L);
ZHANGF:=ABS(C-O)/O;
WEI21:IF(CODELIKE('9999'),(H-L)*0.5+L,IF(C>O,(C-O)*0.5+O,(O-C)*0.5+C)),NODRAW;
STICKLINE(ZHANGF>=0.03 && FLAG >= 0.03,WEI21,WEI21,-1,0),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0,1,0,HYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.05,1,0,DYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.1,1,0,GNBLOCK),COLORYELLOW;
明日涨停:ZTPRICE(C,0.1),NODRAW,COLORRED;
实三一:O+(C-O)*2/3,NODRAW,COLOR99CC32;
实三二:O+(C-O)/3,NODRAW;
虚三一:H-(H-L)/3,NODRAW;
虚二一:H-(H-L)*0.5,NODRAW,COLORMAGENTA;
虚三二:H-(H-L)*2/3,NODRAW;
TK:=C>O AND O>=REF(MAX(C,O),1)+0.01 OR O>=REF(C,1)+0.01 ;
STICKLINE(TK, O,(C-O)*0.01+O,3,0),COLORYELLOW;
ZF:=H>=INTPART(REF(C,1)*1.1*100+0.5)/100 AND H>C;
DT:=L<=INTPART(REF(C,1)*0.9*100+0.5)/100 AND L<C;
上影线幅度:=((H-REF(C,1))/REF(C,1)-(MAX(O,C)-REF(C,1))/REF(C,1))*100;
下影线幅度:=((REF(C,1)-L)/REF(C,1)-(REF(C,1)-MIN(O,C))/REF(C,1))*100;
上影线长:=H-MAX(O,C);
下影线长:=MIN(O,C)-L;
长度比较:=上影线长/下影线长;{上下影线长度比}
STICKLINE((MIN(O,C)=L OR 长度比较>1) AND ZF,H-上影线长*1,H,0.01,0),COLORRED;
STICKLINE((MAX(O,C)=H OR 长度比较<1) AND DT,L+下影线长*1,L,0.01,0),COLORBLUE;