if 买01 and 卖01 and 买02 and 卖02 then
begin
buy(买01,1,market);
buyshort(卖01,1,market);
end
if 买01=0 and 卖01=0 and 买02 and 卖02 then
begin
buy(买02,1,market);
buyshort(卖02,1,market);
end
if 买01 and 卖01and 买02=0 and 卖02=0 then
begin
buy(买01,1,market);
buyshort(卖01,1,market);
end
sell(买01,0,market);