--
//日内均价
ZQ:=IF(LLV(DAY,0)=HHV(DAY,0),0,BARSLAST(DAY<>REF(DAY,1))+1),LINETHICK0;
ss:IF(SUM(VOL,ZQ)=0,(HIGH+LOW+OPEN+CLOSE)/4,SUM((HIGH+LOW+OPEN+CLOSE)/4*VOL,ZQ)/SUM(VOL,ZQ)) ;
//开多
开多: BUY(close-ss>=2&&CLOSE-ss<=20 AND HOLDING<=0),TFILTER ;
SELL(CLOSE-ENTERPRICE>=20 AND HOLDING>0,1,MARKET),TFILTER ;//ZHIYIN
SELL( ENTERPRICE-CLOSE>=10 AND HOLDING>0,1,MARKET),TFILTER ;//ZHISUN
//开空
{buyshort(ss-close>=2&&close-ss<=20 and HOLDING>=0 ),TFILTER;
sell(ENTERPRICE-close>=20 and HOLDING<0,1,MARKET),TFILTER;
sell(close-ENTERPRICE>=10 and HOLDING<0,1,MARKET),TFILTER;}
//其他
当前持仓:=HOLDING,COLORGRAY,LINETHICK0;
当前资产:=ASSET,NOAXIS,COLORGRAY;