创业板2020.8月23日后,涨跌停版变成20%了,因此这个公式的编写也相应改变了。
下面的精准涨跌停 源码提供参考,
注意有变化的,是红色的源码部分:
VER1:=1200823;
BK:=IF(INBLOCK('科创板'),0.2,IF(INBLOCK('创业板') AND DATE VER1,0.2 ,IF(INBLOCK('ST板块'),0.05,0.1)));
涨停:=C =ZTPRICE(REF(C,1),BK) AND C=H;
跌停:=C =DTPRICE(REF(C,1),BK) AND C=L;
RC1:=REF(C,1);
CS:=IF(C =1,10000,100000);
C涨停10:=1.10*RC1-49/CS;
C涨停5 :=1.05*RC1-49/CS;
C跌停10:=0.90*RC1+51/CS;
C跌停5 :=0.95*RC1+51/CS;
STICKLINE((H=ZTPRICE(REF(C,1),BK) AND C H),H,MAX(C,O),0,0),COLORMAGENTA;{涨停后回落}
STICKLINE((L=DTPRICE(REF(C,1),BK) AND C L),L,MIN(C,O),0,0),COLORLICYAN;{跌停后回升}
大阳线:=C O AND (C =C涨停5 OR C (1.05*O-51/CS) ) OR (C 1000 AND C RC1*1.024);
STICKLINE(大阳线,O,C,1,0),COLOR0000BB;
大阴线:=C O AND (C =C跌停5 OR C (0.95*O+49/CS) ) OR (C 1000 AND C RC1*0.976);
STICKLINE(大阴线,O,C,1,0),COLORLIGREEN;
STICKLINE(涨停,O,C,1,0),COLORMAGENTA;
STICKLINE(跌停,O,C,1,0),COLORBLUE;
假阴:=C O AND C REF(C,1);
STICKLINE(假阴,O,C,0,0),COLORRED;{假阴柱};
假阳:=C O AND C REF(C,1);
STICKLINE(假阳,O,C,0,0),COLORGREEN;{假阳柱};
大盘TJ:=PERIOD=5 AND NAMELIKE('上证指数')
AND (ABS((C-REF(C,1)))/REF(C,1) =0.025 OR ABS(C-O) =60);
STICKLINE(大盘TJ,(H+L)/2,(H+L)/2,2,0),COLORYELLOW;{显示大盘日线的60点大K线中值};
STICKLINE((大阳线 OR 大阴线 OR 涨停 OR 跌停)
AND BETWEEN(C,1,500),L+(H-L)/2,L+(H-L)/2,1,0),COLORYELLOW;{大K线画中点线};