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