以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  我是否用到了未来函数?  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=151709)

--  作者:jjjfk
--  发布时间:2017/4/17 9:24:39
--  我是否用到了未来函数?

以下是我的加仓代码:

tr1 : =max(max((high-low),abs(ref(close,1)-high)),abs(ref(close,1)-low));

atr : ma(tr1,20);                               //atr公式

 

a4:=enterprice+2*atr;      //加仓步长

 

问题:在进行回测时(日线周期),当根K线符合进场条件,于是用limitr 限价a4进去。想问,tr1里的highlow是指当根K线收盘时的highlow吧,即highlow是当根K线收盘后才确定的,这样的话,a4是不是用到了未来函数?


--  作者:qq代人发帖
--  发布时间:2017/4/17 9:43:09
--  

回测是按k线走完的情况,不算未来