以文本方式查看主题

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

--  作者:z7c9
--  发布时间:2011/8/14 13:28:55
--  [交易系统]Zig System

input:entrystop(0.5,0.1,1,0.1);
input:exitstop(0.5,0,1,1,0.1);

dayopen:=valuewhen(day>ref(day,1),open);

if holding=0 then begin
 if high>=dayopen*(1+entrystop/100) then begin
  myentryprice:=dayopen*(1+entrystop/100);
  myentryprice:=trimprice(myentryprice);
  buy(1,volunit,limitr,myentryprice);
  exit;
 end 
end

if holding=0 then begin
 if low<=dayopen*(1-entrystop/100) then begin
  myentryprice:=dayopen*(1-entrystop/100);
  myentryprice:=trimprice(myentryprice);
  buyshort(1,volunit,limitr,myentryprice);
  exit;
 end
end

if holding>0 then begin
 if low<=dayopen*(1-exitstop/100) then begin
  myexitprice:=dayopen*(1-exitstop/100);
  myexitprice:=trimprice(myexitprice);
  sell(1,holding,limitr,myexitprice);
  exit;
 end
 
 if time>=closetime(0) then
  sell(1,holding,limitr,close);
end

if holding<0 then begin
 if high>=dayopen*(1+exitstop/100) then begin
  myexitprice:=dayopen*(1+exitstop/100);
  myexitprice:=trimprice(myexitprice);
  sellshort(1,holding,limitr,myexitprice);
  exit;
 end
 
 if time>=closetime(0) then
  sellshort(1,holding,limitr,close);
end

资产:asset,noaxis,colorred,linethick2;

 

 

图片点击可在新窗口打开查看


--  作者:王锋
--  发布时间:2011/8/14 16:31:59
--  
这么牛啊一下发这么多
--  作者:伍星亮
--  发布时间:2011/8/31 10:58:54
--  
z7c9真是无私奉献。今天来策略发布区收获不少