zuoshou:=callstock(STKLABEL,vtclose,6,-1); o1:=VALUEWHEN(TODAYBAR=1,o); //多头 if o1-zuoshou>=40*mindiff and todaybar=2 and ref(c>o,1) and h>ref(h,1) then buy(holding=0,1,market);; if enterprice-c>10*mindiff then sell(holding>0,0,market); if time>=145700 then sell(holding>0,0,market); //空头 if zuoshou-o1>=40*mindiff and todaybar=2 and ref(c<o,1) and l<ref(l,1) then buyshort(holding=0,1,market); if c-enterprice>10*mindiff then sellshort(holding<0,0,market); if time>=145700 then sellshort(holding<0,0,market);