//一个简单的均线上穿
//一分钟周期,K线走完,逐周期模式
ma5:ma(close,5);
ma15:ma(close,15);
if CROSS(ma5,ma15) and time>091500 and time<145000 then
begin
sellshort(holding<0,1,market);
buy(holding=0,1,limit,c+2*mindiff);
end
if CROSS(ma15,ma5) and time>091500 and time<145000 then
begin
sell(holding>0,1,market);
buyshort(holding=0,1,limit,c-2*mindiff);
end
//收盘前5分钟平仓
if time > 145500 then
begin
sell(holding > 0, 0, thisclose);
sellshort(holding < 0, 0, thisclose);
end