A1:=IF(INBLOCK('北证板') OR INBLOCK('创业板') OR INBLOCK('科创板') OR INBLOCK('ST板块'),1,0);
A2:=IF(A1=1,ROUND2(REF(C,1)*1.2, 2),ROUND2(REF(C,1)*1.1,2));{昨日收盘价计算出来的涨停价}
A3:=IF(A1=1,ROUND2(REF(C,1)*0.8, 2),ROUND2(REF(C,1)*0.9,2));{昨日收盘价计算出来的跌停价}
A4:=IF(A2=C,1,0);
上次涨停:=REF(BARSLAST(A4),1);
首板:=BETWEEN(上次涨停,5,50000);
昨日均价:=MA.MA1#DAY;
差值:=Abs(CLOSE-昨日均价);
偏离值:=差值/昨日均价*100;
日均量:="vol.MAVOL1#DAY";
CCC:=IF(REF(L,2)>REF(H,1),REF(L,2),REF(C,1));
日大量:=日均量*1.5;
量能:=V>日大量 AND C>CCC;
大单选股:=量能 AND 偏离值>4.9;
{量能潮}
VA:=IF(量能>REF(量能,1),AMO,-AMO);
obv1:=SUM(IF(量能=REF(量能,1),0,VA),0);
OBV2:=EMA(OBV1,3)-MA(OBV1,9);
OBV3:=EMA(IF(OBV2>0,OBV2,0),3);
MAC3:=MA(量能,3);
量能选股:=大单选股 AND OBV3>REF(OBV3,1) AND MAC3>REF(MAC3,1);
首板量能选股:量能选股 AND 首板 AND REF(C,1)<=20;