-- 作者:jinzhe
-- 发布时间:2015/7/21 8:43:24
--
if time=093000 and h>=ma(c,5) then buy(holding=0,1,market);
if time=093000 and l<=ma(c,5) then buyshort(holding=0,1,market);
if holding>0 and l<enterprice-10*mindiff then sell(1,0,market);
if holding<0 and h>enterprice+10*mindiff then sellshort(1,0,market);
if time<151200 and holding>0 and enterbars>0 and l<=hhv(h,enterbars+1)-10*mindiff then begin
sell(1,0,market);
buyshort(holding=0,1,market);
end
if time<151200 and holding<0 and enterbars>0 and h>=llv(l,enterbars+1)+10*mindiff then begin
sellshort(1,0,market);
buy(holding=0,1,market);
end
if time>=151200 then begin
sell(1,0,market);
sellshort(1,0,market);
end
|
-- 作者:jinzhe
-- 发布时间:2015/7/23 13:36:04
--
if time=093000 and h>=ma(c,5) then buy(holding=0,1,market);
if time=093000 and l<=ma(c,5) then buyshort(holding=0,1,market);
if holding>0 and l<enterprice-10*mindiff then begin
sell(1,0,market);
buyshort(holding=0,1,market);
end
if holding<0 and h>enterprice+10*mindiff then begin
sellshort(1,0,market);
buy(holding=0,1,market);
end
if time<151200 and holding>0 and enterbars>0 and l<=hhv(h,enterbars+1)-10*mindiff then begin
sell(1,0,market);
buyshort(holding=0,1,market);
end
if time<151200 and holding<0 and enterbars>0 and h>=llv(l,enterbars+1)+10*mindiff then begin
sellshort(1,0,market);
buy(holding=0,1,market);
end
if time>=151200 then begin
sell(1,0,market);
sellshort(1,0,market);
end
|