老师好,我的模型有个交易系统是收盘前2分钟平仓的,请改为平仓后反手开仓
//交易条件:
开多平空条件:=h>x周期高点 and adxr>50 and oi>=ref(灵介质,1) and 开仓时间 and holding<=0;
开空平多条件:=l<x周期低点 and adxr>50 and oi>=ref(灵介质,1) and 开仓时间 and holding>=0;
//交易系统
M1:= T0TOTIME(TIMETOT0(CLOSETIME(0))-60*2); //收盘前2分钟
sell(time>=M1, 0,marketr);
sellshort(time>=M1,0,marketr);
M1:= T0TOTIME(TIMETOT0(CLOSETIME(0))-60*2); //收盘前2分钟
sell(time>=M1, 0,marketr);
sellshort(time>=M1,0,marketr);
开多平空条件:=h>x周期高点 and adxr>50 and oi>=ref(灵介质,1) and 开仓时间 and holding<=0;
开空平多条件:=l<x周期低点 and adxr>50 and oi>=ref(灵介质,1) and 开仓时间 and holding>=0;
//交易系统
M1:= T0TOTIME(TIMETOT0(CLOSETIME(0))-60*2); //收盘前2分钟
if m1 then begin
sellshort(1,0,marketr);
buy(holding=0,1,marketr);
end
if m1 then begin
sell(1,0,marketr);
buyshort(holding=0,1,marketr);
end