以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 15分钟的K线图上,怎么获取30分钟的均线图,不带未来函数。 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=65861) |
-- 作者:qq代人发帖 -- 发布时间:2014/6/6 9:11:16 -- 15分钟的K线图上,怎么获取30分钟的均线图,不带未来函数。 请教:15分钟的K线图上,怎么获取30分钟的均线图,不带未来函数,这里有个问题是期货上午还有15分钟的休息时间。
我参考了之前1分钟引用5分钟数据的做法,写了这段代码,请指教。
30分周期收盘价:=STKINDI(\'\',\'MA.MA2\',0,4);
cond:time=093000 or time=100000 or time=101500 or time=110000 or time=113000 or time=140000 or time=143000 or time=150000; M5:=IF(cond,CLOSE,0); SUMMIN30MA10:=REF(SUM(M5,16),1); IF cond=0 THEN BEGIN MIN30MA10A:=(SUMMIN30MA10+CLOSE)/10; END; ELSE BEGIN MIN30MA10B:=30分周期收盘价; END; JG:IF(cond=0,MIN30MA10A,MIN30MA10B); |
-- 作者:jinzhe -- 发布时间:2014/6/6 9:38:38 -- c1:callstock(stklabel,vtclose,4,-1); c2:callstock(stklabel,vtclose,4,-2); c3:callstock(stklabel,vtclose,4,-3); c4:callstock(stklabel,vtclose,4,-4); c5:callstock(stklabel,vtclose,4,-5); c6:callstock(stklabel,vtclose,4,-6); c7:callstock(stklabel,vtclose,4,-7); c8:callstock(stklabel,vtclose,4,-9); c9:callstock(stklabel,vtclose,4,-9); ma10_min30:(c1+c2+c3+c4+c5+c6+c7+c8+c9+close)/10; |
-- 作者:cgysdf -- 发布时间:2014/6/6 10:50:22 -- 谢谢JINZE,我解决了。 |