一:日k涨跌停颜色标识
进入个股日k,点击均线,点击公式修改,在编辑区顶部输入公式:
CK:=IF(CODELIKE('688') OR CODELIKE('300') OR CODELIKE('301'),1,0);
FCK:=IF(CODELIKE('688') OR CODELIKE('300') OR CODELIKE('301'),0,1);
涨停:=C/REF(C,1)>1.09465 AND C=H OR C/REF(C,1)>1.19465 AND C=H;
STICKLINE(涨停,CLOSE,OPEN,8,0),coloryellow,LINETHICK3;
跌停:=C/REF(C,1)<=0.91 AND C=L OR C/REF(C,1)<=0.191 AND C=L;
STICKLINE(跌停,CLOSE,OPEN,8,0),colorgreen,LINETHICK3;
无上影:= C=H AND NOT(涨停);
STICKLINE(无上影,CLOSE,OPEN,8,0),colorwhite,LINETHICK;
主炸:=IF((H-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0) AND C<H AND FCK;
创炸:=IF((H-REF(C,1))*100/REF(C,1)>=(20-0.01*100/REF(C,1)),1,0) AND C<H AND CK;
STICKLINE(创炸 AND C>=O,O,C,10,0),colorred;
STICKLINE(创炸 AND C<O,O,C,10,0),colormagenta;
STICKLINE(主炸 AND C>=O,O,C,10,0),colorred;
STICKLINE(主炸 AND C<O,O,C,10,0),colormagenta;
颜色解释:
黄色涨停,紫色炸板阴线线,红色炸板阳线。绿色跌停。
二:日k界面显示个股所属板块
进入个股k线界面 -> 点击均线 - > 点击修改公式,注意下面必须是显示前8条均线, 在编辑区底部输入公式:
IF CODELIKE('399')=0 AND CODELIKE('000001')=0 THEN DRAWTEXT_FIX(ISLASTBAR ,0.25,0.1,0,'题材概念'+" "+BLOCK(3,8)),colorred;
IF CODELIKE('399')=0 AND CODELIKE('000001')=0 THEN DRAWTEXT_FIX(ISLASTBAR ,0.15,0.1,0,"行业"+ " "+BLOCK(0,8)),colorred;
IF CODELIKE('399')=0 AND CODELIKE('000001')=0 THEN DRAWTEXT_FIX(ISLASTBAR ,0.15,0.1755,0,"细分行业"+ " "+BLOCK(1,8)),colorred;
DRAWTEXT_FIX(1,0.05,0.9,0,'流通市值:'+TOSTRING(LTSZ/100000000,2)+'亿'),coloryellow;
步凑如图:
三:分时界面显示个股所属板块
第一步:打开同花顺任意一个股票的分时图-点击分时线后,单击右键,如图:
第二步:插入代码
DRAWTEXT_FIX(1,0.05,0.9,0,'流通市值:'+TOSTRING(LTSZ/100000000,2)+'亿'),coloryellow;
DRAWTEXT_FIX(1,0.05,0.7,0,'概念:'+BLOCK(3,15)),colorcyan;
DRAWTEXT_FIX(1,0.05,0.8,0,'行业:'+BLOCK(0,00)+'__'+BLOCK(1,0)+'__'+BLOCK(2,0)),colormagenta;
四:显示连板数
涨停1:=REF(C,1)*1.1-C< 0.01 AND C=H;涨停2:=REF(C,1)*1.2-C< 0.01 AND C=H;涨停:=涨停1 OR 涨停2;AA:=BARSLASTCOUNT(涨停);DRAWTEXT(涨停,H*1.03,BARSLASTCOUNT(涨停));