if holding=>0 and cond1 then
begin
sell(1,1,market);
buyshort(1,1,market);
end
if holding<=0 and cond2 then
sellshort(1,0,market);
buy(1,1,market);