平多:sell(tmp<0 and holding>0,手数,marketr);
平空:sellshort(tmp>0 and holding<0,手数,marketr);
开多:buy(tmp>0 and holding<=0,手数,marketr);
开空:buyshort(tmp<0 and holding>=0,手数,marketr);
今天晚上黄金多次出现不成交,5分周期
if holding=0 then begin
if tmp>0 then
buy(1,手数,marketr);
end
if holding=0 then begin
if tmp<0 then
buyshort(1,手数,marketr);
end
if holding>0 then begin
if tmp<0 then begin
sell(1,holding,marketr);
buyshort(1,手数,marketr);
end
end
if holding<0 then begin
if tmp>0 then begin
sellshort(1,holding,marketr);
buy(1,手数,marketr);
end
end
这2种模式那个优?