以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  以沪指为运行标的判断开平仓  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=80455)

--  作者:qq代人发帖
--  发布时间:2015/7/6 10:03:57
--  以沪指为运行标的判断开平仓

以沪指为运行标的判断开平仓,交易标的if1507

这个怎么改

 

ma5:ma(close,5);

ma15:ma(close,15);


 

//开多

if CROSS(ma5,ma15) and time>090100 and time<145000 then

begin

sellshort(holding<0,1,thisclose);

buy(holding=0,1, thisclose);

end

//开空

if CROSS(ma15,ma5) and time>090100 and time<145000 then

begin

sell(holding>0,1,thisclose);

buyshort(holding=0,1, thisclose);

end


--  作者:jinzhe
--  发布时间:2015/7/6 10:05:19
--  
启用下单品种映射,交易在股票上,再映射到股指上
图片点击可在新窗口打开查看此主题相关图片如下:1.png
图片点击可在新窗口打开查看