1,9点30分后才开仓,当价格高于前面30根的最高价时开多单,上涨到50个点减掉30%仓位,再上涨到100点减掉30%仓位,剩余40%要么收盘前一分钟全部平仓,要么涨停板全部平仓; 2,第一个信号是多单,后来下跌低于前30分钟的最低价就反手开空单,其余空单条件和多单相反; 3,1分钟周期就可
variable:fk=0,ff=-1;
bh:HHVBARS(h ,30 ),linethick0;
if time>093000 then
begin
if c>ref(hhv(h,30),1) then
begin
sellshort(holding<0,0,market);
buy(holding=0,10,market);
fk:=c;
ff:=0;
end
if close<ref(llv(l,30),1) then
begin
sell(holding>0,0,market);
buyshort(holding,10,market);
fk:=c;
ff:=3;
end
if ff=0 and c-fk>=50*mindiff then
begin
sell(holding>0,30%,market);
ff:=1;
end
if ff=1 and c-fk>=100*mindiff then
begin
sell(holding>0,30%,market);
ff:=-1;
end
if ff=3 and fk-c>=50*mindiff then
begin
sellshort(holding<0,30%,market);
ff:=4;
end
if ff=4 and fk-c>=100*mindiff then
begin
sellshort(holding<0,30%,market);
ff:=-1;
end
//if CLOSE>DYNAINFO( 54) then sell(holding>0,0,market);
//if close<DYNAINFO( 55) then sellshort(holding<0,0,market);
if time>=145900 then
begin
sell(holding>0,0,market);
sellshort(holding<0,0,market);
end
end
[此贴子已经被作者于2011-11-30 15:19:36编辑过]