以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 求编写模型 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=70737) |
-- 作者:sunfei_1024 -- 发布时间:2014/10/9 9:39:15 -- 求编写模型 收盘价在60日均线以上,并且高于5个交易日的最高价,建立多仓; 收盘价收于60日均线以下,多头退出。 收盘价在60日均线以下,并且低于5个交易日的最低价,建立空仓; 收盘价收于60日均线以上,空头退出。
|
-- 作者:jinzhe -- 发布时间:2014/10/9 9:41:20 -- 处理中,请稍等 |
-- 作者:pyd -- 发布时间:2014/10/9 9:57:50 -- ma1:ma(c,60); hh:hhv(h,5); ll:llv(l,5); if c>ma1 and c>hh then buy(holding=0,1,market); if c<ma1 then sell(holding>0,1,market); if c<ma1 and c<ll then buyshort(holding=0,1,market); if c>ma1 then sellshort(holding<0,1,market); |
-- 作者:sunfei_1024 -- 发布时间:2014/10/9 9:58:57 -- 谢谢老师 |