以文本方式查看主题

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

--  作者:liuche001
--  发布时间:2011/11/23 13:51:55
--  请问老师:这个程序?
[交易系统]Dual Thrust  图片点击可在新窗口打开查看 Post By:2011-8-14 12:54:54

input:k(0.7,0.1,1,0.1);

dist1:=barslast(day>ref(day,1))+1;
dist2:=ref(dist1,dist1);

predayhigh:=ref(hhv(high,dist2),dist1);
predaylow:=ref(llv(low,dist2),dist1);
predayclose:=ref(close,dist1);
predayrange:=max(predayhigh-predayclose,predayclose-predaylow);

dayopen:=ref(open,dist1-1);

upperband:=dayopen+k*predayrange;
lowerband:=dayopen-k*predayrange;

if holding=0 then begin
 if high>=upperband then
  buy(1,volunit,limitr,max(open,upperband));
end

if holding=0 then begin
 if low<=lowerband then
  buyshort(1,volunit,limitr,min(open,lowerband));
end

if holding>0 then begin
 if low<=lowerband then begin
  sell(1,holding,limitr,min(open,lowerband));
  buyshort(1,volunit,limitr,min(open,lowerband));
 end
 
 if time>=closetime(0) then
  sell(1,holding,limitr,close);
end

if holding<0 then begin
 if high>=upperband then begin
  sellshort(1,holding,limitr,max(open,upperband));
  buy(1,volunit,limitr,max(open,upperband));
 end
 
 if time>=closetime(0) then
  sellshort(1,holding,limitr,close);
end

资产:asset,noaxis,colorred,linethick2;

请问老师:这个老师写的程序,我把它放入金字塔模拟,从昨天到今天怎么一个信号都没有的?
--  作者:liuche001
--  发布时间:2011/11/23 14:33:28
--  
从测试看昨天应该有信号的
--  作者:liuche001
--  发布时间:2011/11/23 14:34:13
--  
是豆粕1205
--  作者:just
--  发布时间:2011/11/23 16:17:18
--  

请问你这个策略是加载在那个周期上的?

 


--  作者:liuche001
--  发布时间:2011/11/23 18:28:36
--  
一分钟的,请问这个加载在哪个周期上有讲究吗
--  作者:just
--  发布时间:2011/11/25 9:55:22
--  

已经测试过了,是有信号的。