以文本方式查看主题

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

--  作者:丁洁
--  发布时间:2015/10/10 10:37:56
--  请老师帮忙看一下我写的空头交易系统问题出在哪里

variable:bj=0,n=1,m=2;
variable:t=1,s=2;
ma5:=ma(c,5);
if ma5<10*n  and bj=0 and m=n+1 then begin
 sellshort((1,1,market);
 n:=n+1;
 m:=m+1;
end


if holding>0 and bj=0 and openprofit>=1000 then BEGIN
 sell(1,0,market);
 bj:=1;
end

if ma5<valuewhen(t=1,close)+10*t and bj=1 and s=t+1 then begin
 sellshort((1,1,market);
 t:=t+1;
 s:=s+1;
end

if bj=1 and holding>0 and openprofit>=1000 then begin
 sell(1,0,market);
 t:=1;
 s:=2;
end


 


--  作者:jinzhe
--  发布时间:2015/10/10 10:40:54
--  

variable:n=1,m=2;
variable:t=1,s=2;
ma5:=ma(c,5);


if ma5<valuewhen(t=1,close)-10*t  and s=t+1 then begin
 buyshort(1,1,market);
 t:=t+1;
 s:=s+1;
end

if holding<0 and openprofit>=1000 then begin
 sellshort(1,0,market);
 t:=1;
 s:=2;
end


--  作者:丁洁
--  发布时间:2015/10/10 10:45:25
--  
谢谢老师