以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://www.weistock.com/bbs/index.asp)
--  金字塔软件问题提交  (http://www.weistock.com/bbs/list.asp?boardid=2)
----  按视频写的公式不能用啊  (http://www.weistock.com/bbs/dispbbs.asp?boardid=2&id=12959)

--  作者:jacan888
--  发布时间:2012/7/17 8:44:47
--  按视频写的公式不能用啊

你好
有老师在么,怎么我按视频写的公式不能用啊,谁能告诉我啊谢谢了
h30:=ref(hhv(h,30),1);
l30:=ref(llv(l,30),1);
h20:=ref(hhv(h,20),1);
l20:=ref(llv(l,20),1);

//多头进场条件
LONG:=h>h30 and time>093000 and time<145200;
if  long then
      begin
      sellshort(holding<0,holding,limiTR,h30);
      buy(holding<0,1,limitR,h30);
      end
 
 
//多头止损线
partline (holding>0,L30,coloryellow);

longs:=l<l20 and holding>0;

if  longs then
       begin
       sell(1,0,limit,l20);
       end

//空头进场条件
SHORT:=L<L30 and time>093000 and time<145200;

if  short then
       begin
       sell(holding>0,0,limitR ,l30);
       buySHORT(holding<0,1,limitR,l30);
       end

 //空头止损线      
partline(holding<0,h30,colorred);

SHORT:=(h>h20 and holding<0);
 
 if  SHORT then
     begin
     sellshort(1,0,limitR,h20);
     end

sell(time>145500 and holding>0,0,thisclose);
sell(time>145500 and holding<0,0,thisclose);

资产:ASSET,NOAXIS;
可用现金:CASH(0),LINETHICK0;
持仓:HOLDING,LINETHICK0;


--  作者:董小球
--  发布时间:2012/7/17 9:00:51
--  
不知道楼主是按照什么视频做的,语法是没有问题的
但是没有信号,估计是条件都不成立所以才这样的
估计这个例子只是讲解怎么写指标的吧

建议楼主如果是刚开始学习金字塔指标编写的话,从F1帮助的基础教程入手,刚开始就弄这么复杂的指标,让别人没办法帮你找问题的。

--  作者:just
--  发布时间:2012/7/17 9:21:24
--  

楼主请勿重复发帖。