看1分鐘K線,商品早上9點(diǎn)開盤到到9點(diǎn)10分之間有個(gè)高H.低點(diǎn)L,9:10以后價(jià)格突破前10分鐘高點(diǎn)即H+1時(shí)就買入, 止損價(jià)格是L-1.如無觸發(fā)止損就一直留到下午最后一分鐘平倉,但中途觸發(fā)到漲停板就平倉. 作空相反,
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