if holding=0 then
begin
MyEnterPrice:=open;
buy(1,1,LIMITR,MyEnterPrice);
end;
if holding>0 and high>=AVGENTERPRICE+2 then
begin
MyExitPrice:=AVGENTERPRICE+2;
sell(1,0,LIMITR,MyExitPrice);
end;
if holding>0 and low<=MyEnterPrice-5 then
begin
LongPrice5:=MyEnterPrice-5;
buy(1,1,LIMITR,LongPrice5);
end;
if holding>0 and low<=MyEnterPrice-10 then
begin
LongPrice10:=MyEnterPrice-10;
buy(1,1,LIMITR,LongPrice10);
end;
if holding>0 and low<=MyEnterPrice-20 then
begin
LongPrice20:=MyEnterPrice-20;
buy(1,1,LIMITR,LongPrice20);
end;
if holding>0 and low<=MyEnterPrice-50 then
begin
LongPrice50:=MyEnterPrice-50;
buy(1,1,LIMITR,LongPrice50);
end;
if holding>0 and low<=MyEnterPrice-100 then
begin
LongPrice100:=MyEnterPrice-100;
buy(1,1,LIMITR,LongPrice100);
end;
if holding>0 and low<=MyEnterPrice-200 then
begin
LongPrice200:=MyEnterPrice-200;
buy(1,1,LIMITR,LongPrice100);
end;
if holding>0 and low<=MyEnterPrice-500 then
begin
LongPrice500:=MyEnterPrice-500;
buy(1,1,LIMITR,LongPrice500);
end;
这些代码看不出问题,请写全部的代码