以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- [求助]求大神帮写一下;谢谢 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=96802) |
-- 作者:洋气的仙人球 -- 发布时间:2016/4/27 20:11:52 -- [求助]求大神帮写一下;谢谢 求大神帮写一模型
开多仓:MACD值>上周期MACD值且MACD值<上周期MACD值+5 市价开仓 平多仓:MACD值<上周期MACD值-5或者MACD值>上周期MACD值+5 市价平仓 开空: MACD值<上周期MACD值且MACD值>上周期MACD值-5 市价开仓 平空仓:MACD值>上周期MACD值+5或者MACD值<上周期MACD值-5 市价平仓
|
-- 作者:jinzhe -- 发布时间:2016/4/28 8:58:35 -- macd:=stkindi(\'\',\'macd.macd1\',0,datatype); if macd>ref(macd,1) and macd<ref(macd,1)+5 then buy(holding=0,1,marketr); if (macd<ref(macd,1)-5) or (macd>ref(macd,1)+5) then sell(1,0,marketr); if macd<ref(macd,1) and macd>ref(macd,1)-5 then buyshort(holding=0,1,marketr); if (macd>ref(macd,1)+5) or (macd<ref(macd,1)-5) then sellshort(1,0,marketr); |
-- 作者:洋气的仙人球 -- 发布时间:2016/4/28 14:41:42 -- 谢谢大神 |