以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  交易策略发布专区  (http://weistock.com/bbs/list.asp?boardid=10)
----  [交易系统]时空交易  (http://weistock.com/bbs/dispbbs.asp?boardid=10&id=5317)

--  作者:z7c9
--  发布时间:2011/2/27 22:10:14
--  [交易系统]时空交易


 

 

input:n(11,1,20,1);
input:m(35,5,120,5);

longcond:=ref(close,1)-ref(close,n)>=m*mindiff;
longprice:=open;

shortcond:=ref(close,n)-ref(close,1)>=m*mindiff;
shortprice:=open;

if holding=0 then begin
 if longcond then
  buy(1,1,limitr,longprice);
end

if holding=0 then begin
 if shortcond then
  buyshort(1,1,limitr,shortprice);
end

if holding>0 then begin
 if time=closetime(0) then
  sell(1,holding,limitr,close);
end

if holding<0 then begin
 if time=closetime(0) then
  sellshort(1,holding,limitr,close);
end
     
收益:asset,noaxis,colormagenta;
次数:totaltrade,linethick0;
胜率:percentwin,linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;

[此贴子已经被作者于2011-10-3 11:23:10编辑过]

--  作者:a7777
--  发布时间:2013/1/29 21:38:56
--  
图片点击可在新窗口打开查看