//區(qū)間多,專做多
input:N(18,1,100,1);
開盤K線數(shù):barslast(day<>ref(day,1))+1,linethick0;
開盤價(jià):ref(c,開盤K線數(shù)-1),colorwhite;
上軌:開盤價(jià)+N,colorred;
long:=cross(c,上軌);
longend:=cross(開盤價(jià),c);
if holding=0 then buy(long,1,thisclose);
if holding>0 then sell(longend,1,thisclose);
if holding>0 and enterprice-c>=20 then sell(1,1,thisclose);
if time>150500 and holding>0 then sell(1,1,thisclose);
?
//區(qū)間空,專做空
input:N(10,1,100,1);
開盤K線數(shù):barslast(day<>ref(day,1))+1,linethick0;
開盤價(jià):ref(c,開盤K線數(shù)-1),colorwhite;
下軌:開盤價(jià)-N,colorred;
short:=cross(下軌,c);
shortend:=cross(c,開盤價(jià));
if holding=0 then buyshort(short,1,thisclose);
if holding<0 then sellshort(shortend,1,thisclose);
if time>150500 and holding<0 then sellshort(1,1,thisclose);
?