以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  老师帮忙看一下  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=87242)

--  作者:么么
--  发布时间:2015/11/12 20:24:22
--  老师帮忙看一下
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



--  作者:么么
--  发布时间:2015/11/12 20:37:39
--  
老师咋是这样呢??
--  作者:么么
--  发布时间:2015/11/12 20:37:55
--  

图片点击可在新窗口打开查看此主题相关图片如下:捕获.png
图片点击可在新窗口打开查看

--  作者:么么
--  发布时间:2015/11/13 8:44:34
--  
老师你觉得还需要修改一下哪??
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;

--  作者:jinzhe
--  发布时间:2015/11/13 8:45:16
--  
抱歉,你的需求无法实现