Z:=(DVOL*C)/100000000;
上穿前高:=CROSS(Z,REF(Z,1)+1000) AND Z>REF(HHV(Z,10),1);
JA1:=DVOL/C;
A2:=SUM(IF(JA1>100 AND CLOSE>REF(CLOSE,1),JA1,0),0);
A3:=SUM(IF(JA1>100 AND CLOSE<REF(CLOSE,1),JA1,0),0);
A4:=SUM(IF(JA1<100 AND CLOSE>REF(CLOSE,1),JA1,0),0);
A5:=SUM(IF(JA1<100 AND CLOSE<REF(CLOSE,1),JA1,0),0);
A6:=A2+A3+A4+A5;
机买:=(A2/A6)*100;
机卖:=(A3/A6)*100;
主力差:=机买-机卖;
加仓2:(主力差>=REF(主力差,1)+0.2);
加仓5:(主力差>=REF(主力差,1)+0.5);
加仓10:(主力差>=REF(主力差,1)+1);
机构加仓金叉:=CROSS(主力差,REF(主力差,1)+0.2);
启动:机构加仓金叉 AND 上穿前高;