Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共1 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[交易系统]三重滤网策略

1楼
z7c9 发表于:2011/2/26 12:02:49


 

 

input:n1(60,5,120,5);
input:n2(20,5,120,5);
input:n3(5,5,120,5);

ma1:=ma(close,n1);
ma2:=ma(close,n2);
ma3:=ma(close,n3);

longcond:=ref(all(ma1>ref(ma1,1),2) and all(ma2<ref(ma2,1),2) and all(ma3>ref(ma3,1),2),1);

shortcond:=ref(all(ma1<ref(ma1,1),2) and all(ma2>ref(ma2,1),2) and all(ma3<ref(ma3,1),2),1);


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

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

if holding>0 then begin
 if shortcond then begin
  sell(1,holding,limitr,open);
  buyshort(1,1,limitr,open);
 end 
 
 if time=150000 then
  sell(1,holding,limitr,open);
end

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

[此贴子已经被作者于2011-10-3 11:24:25编辑过]
共1 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in .25000 s, 2 queries.