Mumbai, August 24: Markets managed to end with decent gains amid consolidation bias in the passing week ended on Friday. The benchmark indices closed the previous week with a gain of 1.5 per cent. The Nifty ended at 11,371.60, while the Sensex closed the week at 38,434.72.