这段代码测试结果是否接近实盘
if holding<0 and cross(c,r5) then
begin
sellshort(1,0,THISCLOSE,r5);
end
if cross(c,r6) then
begin
buy(holding=0,tn,limitr,max(o,r6)); //买涨
end
if holding>0 and cross(r5,c) then
begin
sell(1,0,THISCLOSE,r5);
end
if cross(r7,c) then
begin
buyshort(holding=0,tn,limitr,min(o,r7)); //买跌
end