Markets closed in the red with the Sensex down 45 points at 21,244 and the Nifty was down five points at 6,316.