欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 帮忙看看这个程序除了什么问题,为什么没有信号呢?公式测评也没结果?

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有3802人关注过本帖树形打印复制链接

主题:帮忙看看这个程序除了什么问题,为什么没有信号呢?公式测评也没结果?

帅哥哟,离线,有人找我吗?
neowang007
  1楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:8 积分:8 威望:0 精华:0 注册:2012/5/28 16:42:37
帮忙看看这个程序除了什么问题,为什么没有信号呢?公式测评也没结果?  发帖心情 Post By:2012/8/7 14:45:21    Post IP:112.64.131.2[只看该作者]

//定义开仓次数
variable:kc:=0;
variable:kcb:=0;
input:X(3200,200,10000,100);
input:N(4,2,50,2);
input:TP(33,10,100,5);
input:SL(33,10,100,5);
a:=ref(date,1);
b:=ref(c,N);
//满足节点1->3->7/8,开3次仓

if date<>a and time>=092000 and time<=151000 then
begin
if vol>X and c<b and kc=0 then
begin
   buy(1,1,market);
   kc:=1;
   kcb:=barpos;
   if vol>X and c<b and kc=1 and kcb<>barpos then
      begin
         buy(1,1,market);
         kc:=2;
         kcb:=barpos;
         if vol>X and c<b and kc=2 and kcb<>barpos then
            begin
                buy(1,1,market);
                kc:=3;
                kcb:=barpos;
            end
          else if vol>X and c>b then  sellshort(1,0,market);
     end
end
end
//满足节点1->4->9/10,开3次仓
if date<>a and time>=092000 and time<=151000  then
begin
if vol>X and c<b and kc=0 then
begin
   buy(1,1,market);
   kc:=1;
   kcb:=barpos;
   if vol>X and c>b and kc=1 and kcb<>barpos then
      begin
         sellshort(1,0,market);
         kcb:=barpos;
         if vol>X and c<b and kc=1 and kcb<>barpos then
            begin
                buy(1,1,market);
                kc:=2;
                kcb:=barpos;
            end
          else if vol>X and c>b then  buyshort(1,1,market);
     end
end
end

//满足节点2->5->11/12,开3次仓
if date<>a  and time>=092000 and time<=151000 then
begin
if  vol>X and c>b and kc=0 then
begin
   buyshort(1,1,market);
   kc:=1;
   kcb:=barpos;
   if  vol>X and c<b and kc=1 and kcb<>barpos then
      begin
         sell(1,0,market);
         kcb:=barpos;
         if  vol>X and c<b and kc=1 and kcb<>barpos then
            begin
                buy(1,1,market);
                kc:=2;
                kcb:=barpos;
            end
          else if vol>X and c>b then  buyshort(1,1,market);
     end
end
end

//满足节点2->6->13/14,开3次仓
if date<>a and time>=092000 and time<=151000  then
begin
if  vol>X and c>b and kc=0 then
begin
   buyshort(1,1,market);
   kc:=1;
   kcb:=barpos;
   if  vol>X and c>b and kc=1 and kcb<>barpos then
      begin
         buyshort(1,0,market);
         kc:=2;
         kcb:=barpos;
         if  vol>X and c<b and kc=2 and kcb<>barpos then
            begin
                sell(1,1,market);
                kcb:=barpos;
            end
          else if  vol>X and c>b then  buyshort(1,1,market);
     end
end
end

//如果15点收盘,14点55分全部平仓
if time>=145500 then
begin
   sell(1,0,market);
   sellshort(1,0,market);
end
//如果指引或止损,则平仓

if holding>0 and market <(enterprice-SL*5*mindiff)  then
     sell(1,0,limitr,enterprice-SL*5*mindiff);
     else if holding>0 and market >(enterprice+TP*5*mindiff) then
     sell(1,0,limitr,enterprice+TP*5*mindiff);
if holding<0 and market >(enterprice+SL*5*mindiff)  then
     sellshort(1,0,limitr,enterprice+SL*5*mindiff);
     else if holding>0 and market <(enterprice-TP*5*mindiff) then
     sellshort(1,0,limitr,enterprice-TP*5*mindiff);


 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2012/8/7 16:52:47    Post IP:58.246.57.26[只看该作者]

这个策略是自己写的吗

看第一句开仓语句就能猜到哪里不对。

 



金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部
帅哥哟,离线,有人找我吗?
RogarZ
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:3534 积分:10003 威望:0 精华:5 注册:2012/5/25 0:00:01
  发帖心情 Post By:2012/8/8 9:06:59    Post IP:58.246.57.26[只看该作者]

感觉楼主是不是之前学过其他的软件  用其他软件的思维方式来思考金字塔

//开仓

if cond then begin

  buy

end

//加仓

if cond then begin

buy

end

//止损

 

//平仓
你看下策略发布区的模板



金字塔—专业程序化交易量化投资平台

产品部

-----------------------------------------------------------

欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com
 回到顶部