-- 作者: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
|