if 开仓条件 and holding=0 then begin
buy(1,100,marketr);
bb:=barpos;
end
if barpos=bb+66 then sell(1,0,marketr);
variable:bj=0;
if barpos>1 then begin buy(1,100,marketr); bj:=bj+1;
end
if barslast(cross(bj=1,0.5))>=66 then sell(1,100,marketr); |