以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://www.weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://www.weistock.com/bbs/list.asp?boardid=4)
----  括号不完整  (http://www.weistock.com/bbs/dispbbs.asp?boardid=4&id=158152)

--  作者:vado
--  发布时间:2017/9/22 13:44:28
--  括号不完整

if (rtdfvol>=190 and rtdfvol<=3300) then BEGIN
  if rtdfpri>=0.19 then
    shortprofit:(close -refx(llv(close,30),30))/mindiff;
   end
   else if rtdfpri<=-0.19 then
     longprofit:(refx(hhv(close,30),30)-close))/mindiff;
 end
 end

 

报错说括号不完整,找不出来哪儿有问题


--  作者:FireScript
--  发布时间:2017/9/22 13:58:24
--  

你的begin-end 也有问题。

if rtdfpri>=0.19 then
    shortprofit:( close -refx(llv(close,30), 30))/mindiff;
   else if rtdfpri<=-0.19 then

begin
     longprofit:(refx(hhv(close,30),30)-close )/mindiff;//这里的括号不对
 end

 

另外你的帖子标题要规范。

[此贴子已经被作者于2017/9/22 13:59:25编辑过]