oo +n 开1手,n是一个变量,是1,3,7,9,;比如oo开盘价是100,则在101成交1手,103成交1手,107成交1手,109成交1手,就这几个点上面成交,,其它价位则不成交,并且在60日 均线上方才成交,如果101在60日均线下方则没有成交,则103在60日均线上方的时候成交第1手仓,或者107在60日均线上方开第一次仓。
variable:n=0,n1=0,n2=0,n3=0,n4=0;
variable:m1=0,m2=0,m3=0;
oo:=VALUEWHEN(todaybar=1,o);
ma60:=ma(c,60);
if c>oo+1 and n<2 and c>ma60 then begin
buy(1,1,market);
n:=n+1;
end
if c>oo+3 and 2>n1<4 and c>ma60 then begin
buy(1,1,market);
n1:=n+1;
end
if c>oo+5 and 4>n2<6 and c>ma60 then begin
buy(1,1,market);
n2:=n+1;
end
if c>oo+7 and 6>n3<8 and c>ma60 then begin
buy(1,1,market);
n3:=n+1;
end
if c>oo+9 and 8>n4<10 and c>ma60 then begin
buy(1,1,market);
n4:=n+1;
end
老师你觉得还需要修改一下哪??
variable:n=0,n1=0,n2=0,n3=0,n4=0;
variable:m1=0,m2=0,m3=0;
variable:tt=0,tt1=0,tt2=0,tt3=0,tt4=0;
oo:=VALUEWHEN(todaybar=1,o);
ma60:=ma(c,60);
if c>oo+1 and n<2 and c>ma60 and n=0 and time<>tt then begin
buy(1,1,market);
n:=n+1;
tt:=time;
end
if c>oo+3 and 2>n1<4 and c>ma60 and n=0 and time<>tt1 then begin
buy(1,1,market);
n1:=n+1;
tt1:=time;
end
if c>oo+5 and 4>n2<6 and c>ma60 and n=0 and time<>tt2 then begin
buy(1,1,market);
n2:=n+1;
tt2:=time;
end
if c>oo+7 and 6>n3<8 and c>ma60 and n=0 and time<>tt3 then begin
buy(1,1,market);
n3:=n+1;
tt3:=time;
end
if c>oo+9 and 8>n4<10 and c>ma60 and n=0 and time<>tt4 then begin
buy(1,1,market);
n4:=n+1;
tt4:=time;
end
if time=closetime(0) then n:=0;
if time=closetime(0) then n1:=0;
if time=closetime(0) then n2:=0;
if time=closetime(0) then n3:=0;
if time=closetime(0) then n4:=0;