maxh :=h;
if h>=maxh then maxh :=h;
上面这段代码是用来计算开盘到现在这段时间内的最高价。
下面我依葫芦画瓢,写了一段代码跨品种计算股指指数开盘到现在这段时间内的最高价,但是调试的时候发现这是不对的,我觉得应该是stkindi函数没有用对,希望客服老师能帮忙修改一下~~
xh:=stkindi('if13',h,0,11,0);
if stkindi('if13',h,0,11,0)>xh then xh:=stkindi('if13',h,0,11,0);
maxh :=h;
if h>=maxh then maxh :=h;
这个不是最高价
要用全局变量来定义
variable:maxh=0;
if date<>ref(date,1) then maxh:=h;
if h>=maxh then maxh :=h;
老师,之前是我自己打错了,少打了variable:maxh=0;
不过我的问题是跨品种调用最高价怎么写?下面这段是错误的,麻烦帮忙改一下~~
variable:xh=0;
xh:=stkindi('if13',h,0,11,0);
if stkindi('if13',h,0,11,0)>xh then xh:=stkindi('if13',h,0,11,0);
[此贴子已经被作者于2013-5-20 12:28:13编辑过]
这个用callstock调用,stkindi调用行情不方便
calllstock(stklabel,vthigh,6,-1)
variable : xh=0;
xh:=callstock('if13',vthigh);
if callstock('if13',vthigh)>xh then xh:=callstock('if13,vthigh);
老师,我是这样写的,但是还是不对啊,帮忙看看错在哪里了?
xh:=callstock('if13',vthigh);
这句不要