以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://www.weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://www.weistock.com/bbs/list.asp?boardid=4) ---- 统计连续满足某个条件的周期数,怎么写? (http://www.weistock.com/bbs/dispbbs.asp?boardid=4&id=58355) |
-- 作者:qq代人发帖 -- 发布时间:2013/11/4 13:06:42 -- 统计连续满足某个条件的周期数,怎么写? 请教:统计连续满足某个条件的周期数,怎么写? |
-- 作者:jinzhe -- 发布时间:2013/11/4 13:09:45 -- count(条件,n)=n |
-- 作者:jinzhe -- 发布时间:2013/11/4 15:20:32 -- variable:n=1; if not(ref(条件,1)) and 条件 then n:=1; if ref(条件,1) and 条件 then n:=N+1; if not(条件) then n:=0; |