以文本方式查看主题

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

--  作者:jacan888
--  发布时间:2012/7/17 8:46:06
--  怎么我按视频写的公式不能用啊

你好
有老师在么,怎么我按视频写的公式不能用啊,谁能告诉我啊谢谢了
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;


--  作者:jinzhe
--  发布时间:2012/7/17 8:51:31
--  
下单条件比较难以满足,导入更多的数据会比较好