以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  1分钟K线上求5天前H丶L丶C丶o怎么写?  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=65423)

--  作者:雪球
--  发布时间:2014/5/25 22:44:30
--  1分钟K线上求5天前H丶L丶C丶o怎么写?
请问老师
如果不引用1分钟K线上求5天前H丶L丶C丶o怎么写?

--  作者:jinzhe
--  发布时间:2014/5/26 9:22:43
--  

callstock(stklabel,vthigh,6,-5);

callstock(stklabel,vtlow,6,-5);

callstock(stklabel,vtclose6,-5);

callstock(stklabel,vtopen,6,-5);


--  作者:雪球
--  发布时间:2014/5/26 9:50:27
--  
老师我希望不引用呢
--  作者:jinzhe
--  发布时间:2014/5/26 10:04:21
--  

nn:ref(todaybar,todaybar);
oo:ref(open,todaybar+nn*5-1);
hh:ref(hhv(h,nn),todaybar+nn*4);
ll:ref(llv(l,nn),todaybar+nn*4);
cc:ref(close,todaybar+nn*4);

 


--  作者:雪球
--  发布时间:2014/5/26 10:32:29
--  
谢谢。可推广到m天的吗? nn:ref(todaybar,todaybar); oo:ref(open,todaybar+nn*m-1); hh:ref(hhv(h,nn),todaybar+nn*(m-1)); ll:ref(llv(l,nn),todaybar+nn*(m-1)); cc:ref(close,todaybar+nn*(m-1)); ?
--  作者:jinzhe
--  发布时间:2014/5/26 10:37:36
--  

--  作者:客人
--  发布时间:2014/5/26 10:57:56
--  
谢谢
--  作者:雪球
--  发布时间:2014/5/26 14:17:29
--  
进一步问老师:1分钟k线下日线前一天5日均线dayrma5:(ref(close,todaybar+nn*4)+ref(close,todaybar+nn*3)+ref(close,todaybar+nn*2)+ref(close,todaybar+nn)+ref(close,todaybar))/5;对吗?它与二楼调用计算的公式相比效率哪个高?
--  作者:jinzhe
--  发布时间:2014/5/26 14:20:27
--  
调用效率好,
--  作者:雪球
--  发布时间:2014/5/26 14:28:56
--  
哦。谢谢。调用是不需要计算,直接取数据来,是这样理解吗?