网友回复:NH:=REF(HHV(HIGH,N),1);ML:=REF(LLV(LOW,M),1); 当前持仓:HOLDING,COLORGRAY,LINETHICK0;当前资产:ASSET,NOAXIS,COLORGRAY; SCKD:=REF(CLOSE,TYPEBAR(1,1));SCKK:=REF(CLOSE,TYPEBAR(1,3));//==============================if high>NH thenbegin//平空开多sellshort(holding<0 and high>NH,0);buy(holding<=0 and high>SCKD,1);endif low<ML thenbegin//平多开空sell(holding>0 and low<ML,0);buyshort(holding>=0 and LOW<SCKK,1);end