if cross(t1,t2) then begin
sellshort(1,0,market);
buy(holding=0,1,market);
end
if cross(t2,t1) then begin
sell(1,0,market);
buyshort(holding=0,1,market);