以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 金字塔软件问题提交 (http://weistock.com/bbs/list.asp?boardid=2) ---- 老是帮忙写下ma策略 (http://weistock.com/bbs/dispbbs.asp?boardid=2&id=94493) |
-- 作者:qq代人发帖 -- 发布时间:2016/3/8 15:53:28 -- 老是帮忙写下ma策略 就是只需5日均线,和10日均线,周期一分钟,5日穿过10日为金叉做多,是在信号走完一根K线的下一根K线做多。死叉做空。开仓后止盈5个点,止损为下一个反向信号,金叉做多止损就是下个死叉信号,也要走完一根K线 |
-- 作者:pyd -- 发布时间:2016/3/8 16:04:38 -- ma5:ma(c,5); ma10:ma(c,10); jc:cross(ma5,ma10); sc:cross(ma10,ma5); if jc then begin sellshort(holding<0,1,market); buy( holding=0,1,market); end if sc then begin sell(holding>0,1,market); buyshort( holding=0,1,market); end if c-enterprice>=5 then sell(holding>0,1,market);//多赢 if enterprice-c>=5 then sellshort(holding<0,1,market);//空赢 |