看1分鐘K線,商品早上9點開盤到到9點10分之間有個高H.低點L,9:10以后價格突破前10分鐘高點即H+1時就買入, 止損價格是L-1.如無觸發止損就一直留到下午最后一分鐘平倉,但中途觸發到漲停板就平倉. 作空相反,
t1:=time>131000 and time<185900;
t2:=time>=185900;
hh:=valuewhen(time=131000,hhv(h,10));
ll:=valuewhen(time=131000,llv(l,10));
if t1 and h>hh then sellshort(1,0,market);
if t1 and h>hh then buy(holding=0,1,market);
if t1 and l<ll then sell(1,0,market);
if t1 and l<ll then buyshort(holding=0,1,market);
if t2 then begin
sell(1,0,market);
sellshort(1,0,market);
end