[PEL] 复制代码 Input:ss(1,1,100,1);//开仓手数
if REF(ISDOWN,2) and REF(ISDOWN,1) and ISDOWN then buyshort(holding=0,1,market);
if REF(ISUP,2) and REF(ISUP,1) and ISUP then buy(holding=0,1,market);
BKPRICE:=ENTERPRICE;
BKHIGH:=hhv(h,ENTERBARS+1);
SKLOW:=llv(l,ENTERBARS+1);
if CLOSE<BKPRICE*(1-2/100) or BKHIGH-BKPRICE>=4/100*BKPRICE and CLOSE<BKPRICE+(BKHIGH-BKPRICE)*70/100 then sell(1,holding,market);
if CLOSE>ENTERPRICE*(1+2/100) or ENTERPRICE-SKLOW>=4/100*ENTERPRICE and CLOSE>ENTERPRICE-(ENTERPRICE-SKLOW)*70/100 then sellshort(1,holding,market); |