做日内3分钟周期交易,14时57分全平仓,23时27分全平仓不隔夜,连续两根上涨k线收盘价时平空开多,连续两根下跌k线收盘介平多开空
if all(isup,2) then begin
sellshort(1,0,thisclose);
buy(holding=0,1,thisclose);
end
if all(isdown,2) then begin
sell(1,0,thisclose);
buyshort(holding=0,1,thisclose);
end
if time>032700 then time<=033000 then begin
sell(1,0,thisclose);
sellshort(1,0,thisclose);
end
if time>185700 and time<=closetime(0) then begin
sell(1,0,thisclose);
sellshort(1,0,thisclose);
end