callstock函数时时运算比较占系统资源,请高手改为不时时运算的。
昨日最高价:=callstock(stklabel,vthigh,6,-1);
昨日最低价:=callstock(stklabel,vtlow,6,-1);
前日最高价:=callstock(stklabel,vthigh,6,-2);
前日最低价:=callstock(stklabel,vtlow,6,-2);
大前最高价:=callstock(stklabel,vthigh,6,-3);
大前最低价:=callstock(stklabel,vtlow,6,-3);
能否用函数来表达?
能不能这样使用,也请金字塔客服确认一下
if time>091500 and time<091510 then
begin
昨日最高价:=callstock(stklabel,vthigh,6,-1);
昨日最低价:=callstock(stklabel,vtlow,6,-1);
前日最高价:=callstock(stklabel,vthigh,6,-2);
前日最低价:=callstock(stklabel,vtlow,6,-2);
大前最高价:=callstock(stklabel,vthigh,6,-3);
大前最低价:=callstock(stklabel,vtlow,6,-3);
end
这样这几个参数值在091500—091510运行,其他时间就不运行了,可节省资源。
用运行变量控制只运行一遍。
variable:c1=1;
if c1>0 then
begin
昨日最高价:=callstock(stklabel,vthigh,6,-1);
昨日最低价:=callstock(stklabel,vtlow,6,-1);
前日最高价:=callstock(stklabel,vthigh,6,-2);
前日最低价:=callstock(stklabel,vtlow,6,-2);
大前最高价:=callstock(stklabel,vthigh,6,-3);
大前最低价:=callstock(stklabel,vtlow,6,-3);
c1:=-1;
end
if time>=151455 then c1:=1;
不能
你这个是给时间段赋值,而不是限定某个时间段运行