//2019/4/14
//design
variable:a1:=0;
variable:aa1:=0;
variable:a2:=1;
variable:aa2=1;
//************************
hh:=hhv(h,todaybar);
ll:=llv(l,todaybar);
rhh:=ref(hh,1);
rll:=ref(ll,1);
//************************
if l>rhh then begin
sellshort(1,0,thisclose);
buy(holding=0,1,thisclose);
end
if h<rll then begin
sell(1,0,thisclose);
buyshort(holding=0,1,thisclose);
end
//************************
if time>=144500 then begin
sellshort(holding<0,0,thisclose);
sell(holding>0,0,thisclose);
end
//数据
盈亏:asset-1000000,colorred,linethick1,noaxis;
交易总数:totaltrade,colorwhite,linethick0;
持仓:holding,colorwhite,linethick0;