ma10:=ma(close,10);ma20:=ma(close,20);t1:=cross(close,ma20);t2:=low/ma10>=0.98 or low/ma10<=1.02;t3:=barslast(t1)<=5;xg:t2 and t3;注:突破20日均线的时间设为前5天内有突破信号。
a:=if(ref(close,1)>ref(open,1),close,open);b:=close>a;{//当前收盘价站上前一日实体)c:=max(ref(vol,1),ref(vol,2),ref(vol,3);{//最近3日的成交量最大值}result:if((b and vol>c),1,0);{返回1为符合,0为不符合}