以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  [求助]tholding是不是只在最后的一根bar上参与运算?  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=3603)

--  作者:z7c9
--  发布时间:2010/11/1 11:07:36
--  [求助]tholding是不是只在最后的一根bar上参与运算?

比如后台策略中经常包括如:

 

if tholding=0 then begin
end;

if tholding>0 then begin
end;

if tholding<0 then begin
end;

 

是不是相当与这么写:

 

if islastbar then begin
if tholding=0 then begin
end;

if tholding>0 then begin
end;

if tholding<0 then begin
end;
end;
 

[此贴子已经被作者于2010-11-1 11:10:37编辑过]

--  作者:fly
--  发布时间:2010/11/1 14:27:20
--  

tholding在所有周期上都有效.

 

后台程序化交易,只在最后一根K线上开平仓