hi:=ref(hhv(h,20),1);
lo:=ref(llv(l,20),1);
entertime:=time<=144500;
exittime:=time>=145700;
buycond:=c>hi;
sellcond:=c<lo;
if holding>0 and (sellcond or exittime) then sell(1,1,market),orderqueue;
if holding<0 and (buycond or exittime) then sellshort(1,1,market),orderqueue;
if holding=0 and entertime and buycond then buy(1,1,market),orderqueue;
if holding=0 and entertime and sellcond then buyshort(1,1,market),orderqueue;
hi:=ref(hhv(h,20),1);
lo:=ref(llv(l,20),1);
entertime:=time<=144500;
exittime:=time>=145700;
buycond:=ref(c>hi,1);
sellcond:=ref(c<lo,1);
abb:=not(islastbar) or (islastbar and tholding2=0);//这里要这样处理,否则tholding2会影响前面得信号
if holding>0 and (sellcond or exittime) then sell(1,1,market);
if holding<0 and (buycond or exittime) then sellshort(1,1,market);
if holding=0 and entertime and buycond and abb then buy(1,1,market);
if holding=0 and entertime and sellcond and abb then buyshort(1,1,market);