以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  编写一个公式  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=71187)

--  作者:dzjybj
--  发布时间:2014/10/21 8:25:56
--  编写一个公式
怎么统计一段时间内,价格触碰5日均线的次数。
--  作者:jinzhe
--  发布时间:2014/10/21 8:49:18
--  

nn1:=barslast(date=时间1);

nn2:=barslast(date=时间2);

nn:ref(count(碰触,nn2+1),nn1+1);