涨停:=C/REF(C,1)>1.0970 AND C=H AND C/REF(C,1)< 1.11;
STICKLINE(涨停,O,C,2,0),COLORYELLOW;
跌停:=C/REF(C,1)< 0.913 AND C=L;
STICKLINE(跌停,O,C,2,0),COLORGREEN;
周期:=BARSLAST(REF(涨停,1) AND NOT(涨停));
支撑:=REF(C,周期+2);
压力:=MAX(HHV(O,周期),HHV(C,周期));
进攻线:=MAX(MAX(REF(C,周期),REF(C,周期+1)),MAX(REF(O,周期),REF(O,周期+1)));
不破:=LLV(O,周期)>支撑 AND LLV(C,周期)>支撑;
能破:=C*1.11>压力;
强势:=HHV(HIGH,15)*1.1>HHV(HIGH,30);
低位:=HHV(C,10)/LLV(C,10)< 1.5;
买入信号:=周期>0 AND 周期<=30 AND 不破 AND 低位 AND 强势 AND 能破AND C>进攻线 AND REF(C,1)<=进攻线;
DRAWICON(买入信号 AND COUNT(买入信号,周期)<=2,LOW*0.995,38),COLORRED;
DRAWTEXT(买入信号 AND COUNT(买入信号,周期)<=2,LOW*0.988,' 买--(倚天出鞘)'),COLORYELLOW;