always have things on hand to trade that aren't a neccesity, things like cigarettes and alcohol are always valued by most people especially if they believe they will want have access to them again, for the most part this will get most people to leave you alone (as in a bribe) but keep your guns close if this dose not work.
I say have a safe zone around your main camp, at least in the beginning. Patrol it and defend it. Mine will be at least a 1/2 mile radius if it is just me. Bigger if I have others with me. Any "Raider" comes in that zone and they don't leave. I'd likely snipe a larger group from outside the perimeter to lead them away. A smaller group would be sniped when it suited me. Stealth is the biggest advantage. Hope the Raiders don't realize that. Keep as hidden as possible. Don't leave evidence that you are in the locale. No one I don't know would go to my main base. I would have temporary bases set up with in and on the edge of the zone.
always prepared for the worst - never waits for miracles to happened...
But, if you with a bigger group, I guess it'll be not much obstacles for you to dealing with raiders.
But, if you a single fighter; it's better to rethink your next move twice before you end up dead or at least beaten up black and blue... by raiders. It's like "The Road" version of your own true life event of survival, right ?!?!
Buckle up, Lock n' loaded and keep your eyes open wide ....
Task Force Amazon deals with "armed raiders" everyday and we find them a bigger threat than the infected. We have formed alliances with some of the survival safe camps in our AO because of them. We also coordinate joint patrols and even help in the training of some the local citizens in military tactics. READ OUR BLOGS on how we deal with any armed outsiders in our AO, you need to send out daily patrols to know what is in your AO at all times. Worse thing you can do is sit in a home or ranch and an army of infected or maurading armed men are 50 yards away, because you will be eventually overwhelmed. Even use store mannequins from abandon stores to make it look like you have lots of defenders in your home or area.
I suggest all of you buy Sun Tzu's "The Art of War" ` it's the best information on fighting a guerilla war