if weekday<=4 and time0<=timetot0(closetime(0))-180 then begin
sell(1,holding/2,market);
sellshort(1,holding/2,market);
end
if weekday=4 and time0<=timetot0(closetime(0))-180 then begin
sell(1,0,market);
sellshort(1,0,market);