//周期:分笔成交
//版本:标准版
//合约:股指期货
long:=COUNT(BUYVOL,5)=5;
short:=COUNT(SELLVOL,5)=5;
//平空开多
if long and time>091500 and time<151000 then
begin
sellshort(holding<0,1,thisclose);
buy(holding=0,1,thisclose);
end
//平多开空
if short and time>091500 and time<151000 then
begin
sell(holding>0,1,thisclose);
buyshort(holding=0,1,thisclose);
end
//收盘前5分钟平仓
if time > 151000 then
begin
sell(holding > 0, 0, thisclose);
sellshort(holding < 0, 0, thisclose);
end