You can (and possibly should, exspecially for possible future siege units) dig a moat around the walls and make a drawbridge, best choice would probably be a retractable.
It keeps arrows out, building destroyers cannot destroy bridges from the side where the bridge lies when not retracted, and ofc it lets you seal off your fort.
For marksdwarfes, I would make a level above the bridge, roof it and make fortifications into the walls where you want them to shoot from.
Just care that a), there is a moat so the enemie's archers cannot run up to it, and b), care out for legendary/high master shooters.
They can shoot through fortifications most of the time regardless the distance.
And, if you want to have a really heavy defense without traps, make a entranceway into your fort with a turn somewhere 40-50 tiles into the fort.
Make the tunnel go a few tiles more into the original direction, and build 1-3 overlapping ballistae there.
Train up siege engineers and operators, and as soon as a siege comes, FIRE
Oh, and you can possibly make a drawbridge in front of them too, so that a), you can decline gobbos who overran your first defenses further acces to your fort, and b), guard your siege engineers if an enemy archer comes too close to them.
And never forget the fortifications in front of them either, because siege engines are not affected by them, but your enemies are.
But do not forget, siege operators are civillians, and they WILL run if anything comes in a 20 (?) tile radius of them, being the reason for the long entranceway.
greetz, Freddy
EDIT:
Oh, the ammo.
As long as dwarfes haven't got a (short) path to their enemies as ammo runs out, they will reload.
If they can path, they will go to them and beat them with their crossbows.
make a forbidden door and an ammo stockpile, and it should work.
At least that's what I heard