You can draft a "no trespass" notice and put it on your door, as long as your lease does not prevent posting anything on your door (if it does, you can't). You can't put the notice on any property other than the area you lease--i.e. you can't put it on a common area or the building's front door. Only the property owner (e.g. the landlord) can put a notice on the building as a whole or its common areas, or make policy for the building. The notice has no legal effect directly, but it does put people who see it on notice to not enter, so that if they do try to enter or loiter, if you call the police, they have committed the crime of "defiant trespassing": trespassing despite warning to not do so.An order only comes from the courts. If there is a person you are specifically worried about, you may be able to get an order keeping him or her away from you (a no contract order or restraining order); speak to an attorney about doing this.