I recently purchased a Boss Ce-3 compressor to even out my dynamics and give more sustain but I'm having a spot of trouble deciding where to put it in my effects chain.

For the moment it goes:

Guitar- boss tuner Tu2 - ISP noisegate - Metal muff distortion- Boss DD6 digital delay - Amp

The reason for having the delay there instead off in the effects loop is because I use the amp on clean and use the distortion pedal for distortion and it saves a lot of wiring.

Anyway, I don't know where to put the compressor; in front off or behind the noise gate.

The problem is, the noise gate acts like a limiter cutting off the volume at a certain level to stop hum etc, but if the compressor is after this, the noise gate is cutting off potential sustain.

If the compressor is before the noise gate i get compressed and amplified feed back since I use a lot of gain.

I've tried messing around with it out for a bit but can't decide which is better, where do you think it should go ?
I've always been told to gate, and then compress.
Most of the time the compressor is first. It has a habit of amplifying all noise whether its your guitar or other pedals.