N1:=5;
N2:=21;
N3:=0;
N4:=0;
N5:=0;
N6:=0;
N7:=0;
N8:=0;
K:=3;
DRAWTEXT_FIX(1,0.01,0.01,0,'概念:'+BLOCK(3,10)),colorcyan;
market = IF(stRLEFT(CODE, 2) == 60, "主板", "其他");
market = IF(STRLEFT(CODE, 2) == 00 AND market == "其他", "主板", market);
market = IF(STRLEFT(CODE, 2) == 30 AND market == "其他", "创业板", market);
market = IF(STRLEFT(CODE, 2) == 68 AND market == "其他", "科创版", market);
is_ST = IF(STRLEFT(ZQMC, 2) == "ST" OR STRLEFT(ZQMC, 3) == "*ST" OR STRLEFT(ZQMC, 5) == "XD*ST", TRUE, FALSE);
rate = IF(market=="主板" AND is_ST==FALSE, 1.1, 9999);
rate = IF(market=="主板" AND is_ST==TRUE, 1.05, rate);
rate = IF(market=="创业板", 1.2, rate);
rate = IF(market=="科创版", 1.2, rate);
max_price = REF(C, 1) * rate * 100;
max_price = IF(max_price - FLOOR(max_price) < 0.5, FLOOR(max_price), CEIL(max_price));
max_price = max_price / 100;
is_zhangting = IF(C == max_price, TRUE, FALSE);
is_zhaban=IF(C <> max_price AND H == max_price, TRUE, FALSE);
STICKLINE(is_zhangting, CLOSE, OPEN, 10, 1),coloryellow;
STICKLINE(is_zhangting AND LOW < OPEN, LOW, OPEN, 1, 1),coloryellow;
STICKLINE(is_zhangting, CLOSE, OPEN, 10, 1),coloryellow;
STICKLINE(is_zhaban, MAX(C,O), H, 4, 0),colorgreen;
涨停:=is_zhangting;
炸板:=is_zhaban;
涨停次数:=COUNT(涨停,250);
首板次数:=COUNT(涨停 AND REF(NOT(涨停),1),250);
首板炸次数:=COUNT(炸板 AND REF(NOT(涨停),1),250);
次日红盘率:=COUNT(REF(涨停,1) AND REF(NOT(涨停),2) AND H>=REF(H,1),250)/首板次数;
溢价5点数:=COUNT(REF(涨停,1) AND REF(NOT(涨停),2) AND C>=REF(H,1)*1.05,250);
首板封板率:=首板次数/(首板炸次数+首板次数);
大阳:=CLOSE>REF(CLOSE,1)*1.08;
涨停位置:=IF(REF(BArslAST(涨停),1)+1<=30,REF(BARSLAST(涨停),1)+1,0);
强势横盘:=LLV(CLOSE,涨停位置)>=REF(CLOSE,涨停位置)*0.85
AND HHV(CLOSE,涨停位置)<=REF(CLOSE,涨停位置)*1.30
AND 涨停位置>=3;
买:=涨停 AND H<=REF(CLOSE,涨停位置)*1.12 AND REF(NOT(涨停),涨停位置+1) AND REF(强势横盘,1) AND REF(NOT(大阳),1);
炸:=炸板 AND H<=REF(CLOSE,涨停位置)*1.12 AND REF(NOT(涨停),涨停位置+1) AND REF(强势横盘,1) AND REF(NOT(大阳),1);
股性好:=首板封板率>=0.7 AND 次日红盘率>=0.7;
N板买:=(买 OR 炸) AND 股性好;
新高买:=H>=HHV(H,100) AND N板买;
涨幅小:=REF(CLOSE,4)*1.06<REF(CLOSE,1) AND N板买;
STICKLINE(N板买, CLOSE, OPEN, 10, 0),colorblue;
STICKLINE(N板买, CLOSE*0.999, OPEN*1.001, 8, 0),coloryellow;
DRAWTEXT(N板买,HIGH*1.03,'N板');
IF (k<=0)
RETURN 0;
MA$1:MA(CLOSE, N1);
IF (k<=1)
RETURN 0;
MA$2:MA(CLOSE, N2);
IF (k<=2)
RETURN 0;
MA$3:MA(CLOSE, N3);
IF (k<=3)
RETURN 0;
MA$4:MA(CLOSE, N4);
IF (k<=4)
RETURN 0;
MA$5:MA(CLOSE, N5);
IF (k<=5)
RETURN 0;
MA$6:MA(CLOSE, N6);
IF (k<=6)
RETURN 0;
MA$7:MA(CLOSE, N7);
IF (k<=7)
RETURN 0;
MA$8:MA(CLOSE, N8);