NN1:=BARSLAST(DATE<>REF(DATE,1))+1;
HH1:=REF(HHV(H,NN1),NN1);
LL1:=REF(LLV(L,NN1),NN1);
BF:=HH1-LL1;
if CROSS(C,REF(O,NN1-1)+BF*1.2) then buy(holding=0,1,market);//BPK
if CROSS(REF(O,NN1-1)-BF*1.2,c) then buyshort(holding=0,1,market);//SPK
if C<=enterprice-60 then sell(1,0,market);//止损
if C>=enterprice+60 then sellshort(1,0,market);//止损
if C>=enterprice+95 then sell(1,0,market);//止盈
if C<=enterprice-95 then sellshort(1,0,market);//止盈